summaryrefslogtreecommitdiff
path: root/src/backend/commands/comment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/comment.c')
-rw-r--r--src/backend/commands/comment.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c
index ed1e46e73c1..6d8c0061bdc 100644
--- a/src/backend/commands/comment.c
+++ b/src/backend/commands/comment.c
@@ -36,11 +36,11 @@
* This routine is used to add the associated comment into
* pg_description for the object specified by the given SQL command.
*/
-Oid
+ObjectAddress
CommentObject(CommentStmt *stmt)
{
- ObjectAddress address;
Relation relation;
+ ObjectAddress address = InvalidObjectAddress;
/*
* When loading a dump, we may see a COMMENT ON DATABASE for the old name
@@ -60,7 +60,7 @@ CommentObject(CommentStmt *stmt)
ereport(WARNING,
(errcode(ERRCODE_UNDEFINED_DATABASE),
errmsg("database \"%s\" does not exist", database)));
- return InvalidOid;
+ return address;
}
}
@@ -126,7 +126,7 @@ CommentObject(CommentStmt *stmt)
if (relation != NULL)
relation_close(relation, NoLock);
- return address.objectId;
+ return address;
}
/*