Re: psql display of foreign keys

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: psql display of foreign keys
Дата
Msg-id 20181205160954.zkmyj7lnamebyy2v@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: psql display of foreign keys  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 2018-Dec-05, Michael Paquier wrote:

> This has been mentioned on the thread where pg_partition_tree has been
> discussed:
> https://www.postgresql.org/message-id/6baeb45a-6222-6b88-342d-37fc7d3cf89a%40lab.ntt.co.jp
> 
> It got shaved from the final patch for simplicity as we had enough
> issues to deal with first.  Adding a pg_partition_root or a new column
> in pg_partition_tree makes sense.  My guts are telling me that a
> separate function is more instinctive to use.

I agree with your guts ... you can combine them (the functions, not the
guts) to obtain the full view of the partition hierarchy just by
applying pg_partition_root() to the argument of pg_partition_tree.

I think with pg_partition_root we can rewrite the FK queries to avoid
WITH RECURSIVE with pg12 servers, but of course with a pg11 server we'll
have to keep using WITH RECURSIVE.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: minor leaks in pg_dump (PG tarball 10.6)
Следующее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: Use durable_unlink for .ready and .done files for WAL segmentremoval