]> granicus.if.org Git - postgresql/commitdiff
Add missing support for removing foreign data wrapper / server privileges
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 12 Nov 2010 13:19:14 +0000 (15:19 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 12 Nov 2010 13:30:19 +0000 (15:30 +0200)
belonging to a user at DROP OWNED BY. Foreign data wrappers and servers
don't do anything useful yet, which is why no-one has noticed, but since we
have them, seems prudent to fix this. Per report from Chetan Suttraway.
Backpatch to 9.0, 8.4 has the same problem but this patch didn't apply
there so I'm not going to bother.

src/backend/catalog/aclchk.c

index 0470a7027390ea2ef704dc609e5bb95779f560e0..9b5602ed0047529d61832854fdf529d42089cf1e 100644 (file)
@@ -1386,6 +1386,12 @@ RemoveRoleFromObjectACL(Oid roleid, Oid classid, Oid objid)
                        case TableSpaceRelationId:
                                istmt.objtype = ACL_OBJECT_TABLESPACE;
                                break;
+                       case ForeignServerRelationId:
+                               istmt.objtype = ACL_OBJECT_FOREIGN_SERVER;
+                               break;
+                       case ForeignDataWrapperRelationId:
+                               istmt.objtype = ACL_OBJECT_FDW;
+                               break;
                        default:
                                elog(ERROR, "unexpected object class %u", classid);
                                break;