From 577e21b34f8629ce76651a6388298891f81be99a Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 26 Oct 1999 03:12:39 +0000 Subject: Hello. The following patch extends the COMMENT ON functionality to the rest of the database objects beyond just tables, columns, and views. The grammer of the COMMENT ON statement now looks like: COMMENT ON [ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] | COLUMN . | AGGREGATE | FUNCTION (arg1, arg2, ...) | OPERATOR (leftoperand_typ rightoperand_typ) | TRIGGER ON relname> Mike Mascari (mascarim@yahoo.com) --- src/backend/tcop/utility.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/backend/tcop/utility.c') diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index ec617d75369..6035c89b2ea 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.70 1999/10/15 01:49:43 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.71 1999/10/26 03:12:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,7 @@ #include "commands/async.h" #include "commands/cluster.h" #include "commands/command.h" +#include "commands/comment.h" #include "commands/copy.h" #include "commands/creatinh.h" #include "commands/dbcommands.h" @@ -38,7 +39,6 @@ #include "rewrite/rewriteRemove.h" #include "tcop/utility.h" #include "utils/acl.h" -#include "utils/acl.h" #include "utils/ps_status.h" #include "utils/syscache.h" @@ -242,14 +242,9 @@ ProcessUtility(Node *parsetree, PS_SET_STATUS(commandTag = "COMMENT"); CHECK_IF_ABORTED(); - -#ifndef NO_SECURITY - if (!pg_ownercheck(userName, statement->relname, RELNAME)) - elog(ERROR, "you do not own class \"%s\"", statement->relname); -#endif - - CommentRelation(statement->relname, statement->attrname, - statement->comment); + CommentObject(statement->objtype, statement->objname, + statement->objproperty, statement->objlist, + statement->comment); } break; -- cgit v1.2.3