From d9572c4e3b474031060189050e14ef384b94e001 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 8 Feb 2011 16:08:41 -0500 Subject: Core support for "extensions", which are packages of SQL objects. This patch adds the server infrastructure to support extensions. There is still one significant loose end, namely how to make it play nice with pg_upgrade, so I am not yet committing the changes that would make all the contrib modules depend on this feature. In passing, fix a disturbingly large amount of breakage in AlterObjectNamespace() and callers. Dimitri Fontaine, reviewed by Anssi Kääriäinen, Itagaki Takahiro, Tom Lane, and numerous others --- src/backend/commands/comment.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/backend/commands/comment.c') diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index 2e8c4df9272..bbb3f344093 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -143,6 +143,12 @@ CommentObject(CommentStmt *stmt) (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("must be superuser to comment on procedural language"))); break; + case OBJECT_EXTENSION: + if (!superuser()) + ereport(ERROR, + (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), + errmsg("must be superuser to comment on extension"))); + break; case OBJECT_OPCLASS: if (!pg_opclass_ownercheck(address.objectId, GetUserId())) aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_OPCLASS, -- cgit v1.2.3