pg_partition_tree crashes for a non-defined relation

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pg_partition_tree crashes for a non-defined relation
Дата
Msg-id 20181207010406.GO2407@paquier.xyz
обсуждение исходный текст
Ответы Re: pg_partition_tree crashes for a non-defined relation  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi all,

While testing another patch, I have bumped into the issue of
$subject...  I should have put some more negative testing from the start
on this stuff, here is a culprit query when passing directly an OID:
select pg_partition_tree(0);

I think that we should make the function return NULL if the relation
defined does not exist, as we usually do for system-facing functions.
It is also easier for the caller to know that the relation does not
exist instead of having a plpgsql try/catch wrapper or such.

Thoughts?
--
Michael

Вложения

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

Предыдущее
От: "Imai, Yoshikazu"
Дата:
Сообщение: RE: speeding up planning with partitions
Следующее
От: Michael Paquier
Дата:
Сообщение: Add pg_partition_root to get top-most parent of a partition tree