Re: pgsql: Add pg_partition_root to display top-most parent of apartition

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Add pg_partition_root to display top-most parent of apartition
Дата
Msg-id 20190322035538.GO20192@paquier.xyz
обсуждение исходный текст
Ответ на Re: pgsql: Add pg_partition_root to display top-most parent of apartition  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: [Suspect SPAM] Re: pgsql: Add pg_partition_root to displaytop-most parent of a partition  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-committers
On Fri, Mar 22, 2019 at 12:26:12AM -0300, Alvaro Herrera wrote:
> I noticed days ago that if you call pg_partition_root on the topmost
> partitioned table, the server crashes :-)

It's when you think that the thing is actually done that another issue
pops up.  The attached fixes the issue, I suggest to return the
top-most parent as result if the input is the top-most parent itself.
Returning NULL does not make sense as in this case the relation can be
part of a partition tree.
--
Michael

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql: Add pg_partition_root to display top-most parent of apartition
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [Suspect SPAM] Re: pgsql: Add pg_partition_root to displaytop-most parent of a partition