Re: psql display of foreign keys

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: psql display of foreign keys
Дата
Msg-id 20181204152330.GH20931@fetter.org
обсуждение исходный текст
Ответ на Re: psql display of foreign keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: psql display of foreign keys  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Tue, Dec 04, 2018 at 10:00:00AM -0500, Tom Lane wrote:
> 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.

Makes sense.

> 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.

Do you have cases where we should be measuring performance dips?
Also, is there something about  about indexes involved in this query
or WITH RECURSIVE itself that's pessimizing performance, generally?

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


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

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