Skip to content

Commit 5057366

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 59414cd commit 5057366

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/catalog/objectaddress.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,12 @@ get_object_address_relobject(ObjectType objtype, List *objname,
498498
address.objectId =
499499
get_rewrite_oid_without_relid(depname, &reloid, missing_ok);
500500
address.objectSubId = 0;
501+
502+
/*
503+
* Caller is expecting to get back the relation, even though we
504+
* didn't end up using it to find the rule.
505+
*/
506+
relation = heap_open(reloid, AccessShareLock);
501507
}
502508
else
503509
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy