From 890192e99af5db1d15d5bb73f3f1044faa1d2758 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 11 Mar 2015 17:01:13 -0300 Subject: Support user mappings in get_object_address Since commit 72dd233d3ef we were trying to obtain object addressing information in sql_drop event triggers, but that caused failures when the drops involved user mappings. This addition enables that to work again. Naturally, pg_get_object_address can work with these objects now, too. I toyed with the idea of removing DropUserMappingStmt as a node and using DropStmt instead in the DropUserMappingStmt grammar production, but that didn't go very well: for one thing the messages thrown by the specific code are specialized (you get "server not found" if you specify the wrong server, instead of a generic "user mapping for ... not found" which you'd get it we were to merge this with RemoveObjects --- unless we added even more special cases). For another thing, it would require to pass RoleSpec nodes through the objname/objargs representation used by RemoveObjects, which works in isolation, but gets messy when pg_get_object_address is involved. So I dropped this part for now. Reviewed by Stephen Frost. --- src/include/nodes/parsenodes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/nodes/parsenodes.h') diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index c226b039cf..1279aca882 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1268,6 +1268,7 @@ typedef enum ObjectType OBJECT_TSPARSER, OBJECT_TSTEMPLATE, OBJECT_TYPE, + OBJECT_USER_MAPPING, OBJECT_VIEW } ObjectType; -- cgit v1.2.1