aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/comment.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-12-29 07:55:37 -0500
committerRobert Haas <rhaas@postgresql.org>2012-12-29 07:55:37 -0500
commit82b1b213cad3a69cf5f3dfaa81687c14366960fc (patch)
treee19129f124c02d7ef274393d584de97cc18a5f66 /src/backend/commands/comment.c
parent5ab3af46ddd2f2c2b248f1ffdb688b394d4bb387 (diff)
downloadpostgresql-82b1b213cad3a69cf5f3dfaa81687c14366960fc.tar.gz
postgresql-82b1b213cad3a69cf5f3dfaa81687c14366960fc.zip
Adjust more backend functions to return OID rather than void.
This is again intended to support extensions to the event trigger functionality. This may go a bit further than we need for that purpose, but there's some value in being consistent, and the OID may be useful for other purposes also. Dimitri Fontaine
Diffstat (limited to 'src/backend/commands/comment.c')
-rw-r--r--src/backend/commands/comment.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c
index 267694f5b9a..afada5d6e4f 100644
--- a/src/backend/commands/comment.c
+++ b/src/backend/commands/comment.c
@@ -36,7 +36,7 @@
* This routine is used to add the associated comment into
* pg_description for the object specified by the given SQL command.
*/
-void
+Oid
CommentObject(CommentStmt *stmt)
{
ObjectAddress address;
@@ -60,7 +60,7 @@ CommentObject(CommentStmt *stmt)
ereport(WARNING,
(errcode(ERRCODE_UNDEFINED_DATABASE),
errmsg("database \"%s\" does not exist", database)));
- return;
+ return InvalidOid;
}
}
@@ -123,6 +123,8 @@ CommentObject(CommentStmt *stmt)
*/
if (relation != NULL)
relation_close(relation, NoLock);
+
+ return address.objectId;
}
/*