Re: psql display of foreign keys

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: psql display of foreign keys
Дата
Msg-id 5a177045-771d-781a-7c33-105f39dcdab6@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: psql display of foreign keys  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: psql display of foreign keys
Список pgsql-hackers
On 2019-03-23 03:30, Alvaro Herrera wrote:
>>> Thanks for the updated patch.  I applied it and rebased the
>>> foreign-keys-referencing-partitioned-tables patch on top.  Here's
>>> something I think you may have missed:
>>
>> I missed that indeed!  Thanks for noticing.  Here's an updated and
>> rebased version of this patch.
> 
> I forgot to "git add" the new changes to the expected file.  Here's v8
> with that fixed.

Looks OK in general.

relispartition was added in PG10, so the conditional in
describeOneTableDetails() seems wrong.

In the older branches of that same function, I'd prefer writing

    false AS relispartition

for clarity.

Some of the other queries could also use some column aliases, like

    conrelid = '%s'::pg_catalog.regclass AS isroot (?)

or

    pg_catalog.pg_get_constraintdef(oid, true) AS condef

(as in the other branch).

A test case for the incoming foreign key display would be nice, as that
was the original argument for the patch.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Usage of epoch in txid_current
Следующее
От: Panagiotis Mavrogiorgos
Дата:
Сообщение: Feature: Add Greek language fulltext search