Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a60c16d

Browse files
committed
Unbreak legacy syntax "COMMENT ON RULE x IS y", with no relation name.
check_object_ownership() isn't happy about the null relation pointer. We could fix it there, but this seems more future-proof.
1 parent 989f530 commit a60c16d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/catalog/objectaddress.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ get_object_address_relobject(ObjectType objtype, List *objname, Relation *relp)
463463
address.classId = RewriteRelationId;
464464
address.objectId = get_rewrite_oid_without_relid(depname, &reloid);
465465
address.objectSubId = 0;
466+
467+
/*
468+
* Caller is expecting to get back the relation, even though we
469+
* didn't end up using it to find the rule.
470+
*/
466471
relation = heap_open(reloid, AccessShareLock);
467472
}
468473
else

0 commit comments

Comments
 (0)