mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user