Re: BUG #15833: defining a comment on a domain constraint fails withwrong OID

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #15833: defining a comment on a domain constraint fails withwrong OID
Дата
Msg-id 20190607054233.GG1736@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #15833: defining a comment on a domain constraint fails withwrong OID  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: BUG #15833: defining a comment on a domain constraint fails withwrong OID  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
On Wed, Jun 05, 2019 at 02:15:02PM -0400, Alvaro Herrera wrote:
> Confirmed.  It works for superusers, which explains why the existing
> regression tests pass -- and that's because check_object_ownership()
> (which is handing the OBJECT_DOMCONSTRAINT case wrongly) is bypassed for
> superusers.  Annoyingly, get_object_address does not return the type's
> OID, only the domain's.

Well, it wouldn't be a problem to do a syscache lookup and then use
the type from contypid, no?  It seems to me that it would be more
consistent to just add a pg_domain_constraint_ownercheck() in aclchk.c
as all the syscache lookups happen their for all the other objects
types.  What do you think?
--
Michael

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Test suite fails on macOS after update to 9.6.13 and 11.3
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15838: [contrib] vacuumlo: schema variable checked for NULL three times