mirror of
https://github.com/postgres/postgres.git
synced 2025-06-07 11:02:12 +03:00
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.
This commit is contained in:
parent
989f530d3f
commit
a60c16db5f
@ -463,6 +463,11 @@ get_object_address_relobject(ObjectType objtype, List *objname, Relation *relp)
|
|||||||
address.classId = RewriteRelationId;
|
address.classId = RewriteRelationId;
|
||||||
address.objectId = get_rewrite_oid_without_relid(depname, &reloid);
|
address.objectId = get_rewrite_oid_without_relid(depname, &reloid);
|
||||||
address.objectSubId = 0;
|
address.objectSubId = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Caller is expecting to get back the relation, even though we
|
||||||
|
* didn't end up using it to find the rule.
|
||||||
|
*/
|
||||||
relation = heap_open(reloid, AccessShareLock);
|
relation = heap_open(reloid, AccessShareLock);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user