Re: psql display of foreign keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql display of foreign keys
Дата
Msg-id 23923.1543935600@sss.pgh.pa.us
обсуждение исходный текст
Ответ на psql display of foreign keys  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: psql display of foreign keys  (David Fetter <david@fetter.org>)
Re: psql display of foreign keys  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> This is not very useful.  I propose that we change it so that it only
> displays the one on the partitioned table on which the constraint was
> defined:

OK goal, but ...

> Patch attached.

... this patch breaks the expectation set at the top of describe.c:

 * Support for the various \d ("describe") commands.  Note that the current
 * expectation is that all functions in this file will succeed when working
 * with servers of versions 7.4 and up.  It's okay to omit irrelevant
 * information for an old server, but not to fail outright.

Do you really need WITH RECURSIVE for this?  If so, I'd suggest
applying it only when relkind == RELKIND_PARTITIONED_TABLE, so
that the case doesn't happen in servers too old to have WITH.
That's probably a win performance-wise anyway, as I have no doubt
that the performance of this query is awful compared to what it
replaces, so we don't really want to use it if we don't have to.

            regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: psql display of foreign keys
Следующее
От: David Fetter
Дата:
Сообщение: Re: psql display of foreign keys