pg_partition_tree crashes for a non-defined relation
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@postgresql.org>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Date: 2018-12-07T01:04:06Z
Lists: pgsql-hackers
Attachments
- partition-tree-invalid.patch (text/x-diff) patch
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
Commits
-
Test partition functions with legacy inheritance children, too
- d12fbe2f8e5d 12.0 landed
-
Consider only relations part of partition trees in partition functions
- 3422955735d9 12.0 landed
-
Make pg_partition_tree return no rows on unsupported and undefined objects
- 0f3cdf873e7d 12.0 landed
-
Tweak pg_partition_tree for undefined relations and unsupported relkinds
- cc53123bcc9d 12.0 landed