Re: BUG #15833: defining a comment on a domain constraint fails with wrong OID
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Daniel Gustafsson <daniel@yesql.se>, clemens@ladisch.de, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-06-11T04:55:39Z
Lists: pgsql-bugs
Attachments
- dom-constraint-comments-v3.patch (text/x-diff) patch v3
On Mon, Jun 10, 2019 at 08:55:27AM -0400, Alvaro Herrera wrote: > -1 on this approach. Having this ownercheck function return the owning > object ID seems way too strange. I'd rather not have the new ownercheck > function, and instead do a syscache search to obtain the type OID in > check_object_ownership, then do pg_type_ownercheck. I'm not even sure > that pg_domain_constraint_ownercheck makes a lot of sense in itself, > since it's never the constraint that requires an owner check. I can see your point, yes perhaps I overdid it. What do you think about the attached instead? This moves the syscache lookup directly into check_object_ownership() as you suggest. -- Michael
Commits
-
Fix handling of COMMENT for domain constraints
- 13f4b462dbe8 9.5.18 landed
- ff1a25601e75 9.6.14 landed
- 56a932533aa2 10.9 landed
- fa5f3a4bcca7 11.4 landed
- ceac4505d342 12.0 landed