Re: get_constraint_index() and conindid

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: get_constraint_index() and conindid
Дата
Msg-id 3260997.1607452119@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: get_constraint_index() and conindid  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Ответы Re: get_constraint_index() and conindid  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
> On Mon, 7 Dec 2020 at 11:09, Peter Eisentraut
> <peter.eisentraut@enterprisedb.com> wrote:
>> get_constraint_index() does its work by going through pg_depend.  It was
>> added before pg_constraint.conindid was added, and some callers are
>> still not changed.  Are there reasons for that?  Probably not.  The
>> attached patch changes get_constraint_index() to an lsyscache-style
>> lookup instead.

> This looks quite reasonable, and it passes "make installcheck-world".

+1, LGTM.

> Only thing I could think of is that it maybe could use a (small)
> comment in the message on that/why get_constraint_index is moved to
> utils/lsyscache from catalog/dependency, as that took me some time to
> understand.

commit message could reasonably say that maybe, but I don't think we
need to memorialize it in a comment.  lsyscache.c *is* where one
would expect to find a simple catalog-field-fetch function like this.
The previous implementation was not that, so it didn't belong there.

            regards, tom lane



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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: small cleanup in unicode_norm.c
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Commitfest 2020-11 is closed