Re: Refactor recordExtObjInitPriv()

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Refactor recordExtObjInitPriv()
Дата
Msg-id 20230112000437.GA2032194@nathanxps13
обсуждение исходный текст
Ответ на Refactor recordExtObjInitPriv()  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Refactor recordExtObjInitPriv()  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On Tue, Dec 27, 2022 at 09:56:10AM +0100, Peter Eisentraut wrote:
> Refactor recordExtObjInitPriv():  Instead of half a dozen of
> mostly-duplicate conditional branches, write one common one that can handle
> most catalogs.  We already have all the information we need, such as which
> system catalog corresponds to which catalog table and which column is the
> ACL column.

This seems reasonable.

> +    /* This will error on unsupported classoid. */
> +    else if (get_object_attnum_acl(classoid))

nitpick: I would suggest explicitly checking that it isn't
InvalidAttrNumber instead of relying on it always being 0.

> -             classoid == AggregateRelationId ||

I noticed that AggregateRelationId isn't listed in the ObjectProperty
array, so I think recordExtObjInitPriv() will begin erroring for that
classoid instead of ignoring it like we do today.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Rework of collation code, extensibility
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Reducing the WAL overhead of freezing in VACUUM by deduplicating per-tuple freeze plans