Re: pg_partition_tree crashes for a non-defined relation
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Michael Paquier <michael@paquier.xyz>,
Postgres hackers <pgsql-hackers@postgresql.org>,
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Date: 2018-12-09T19:07:29Z
Lists: pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> ... especially in code that's highly unlikely to break once written. > I don't entirely buy off on the argument that it's code that's 'highly > unlikely to break once written' though- we do add new relkinds from time > to time, for example. Perhaps we could have these functions run just > once per relkind. Well, the relevant code is likely to be "if relkind is not x, y, or z, then PG_RETURN_NULL". If we add a new relkind and forget to consider the function, the outcome is a NULL result that perhaps should not have been NULL ... but a test like this won't help us notice that. regards, tom lane
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