Re: pg_partition_tree crashes for a non-defined relation
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Date: 2018-12-08T06:54:36Z
Lists: pgsql-hackers
On Fri, Dec 07, 2018 at 11:33:32PM -0500, Tom Lane wrote:
> How about cases where the relation OID exists but it's the wrong
> kind of relation?
Such cases already return an error:
=# create sequence popo;
CREATE SEQUENCE
=# select pg_partition_tree('popo');
ERROR: 42809: "popo" is not a table, a foreign table, or an index
LOCATION: pg_partition_tree, partitionfuncs.c:54
I think that's a sensible choice, because it makes no sense to look for
the inheritors of unsupported relkinds. Perhaps you have a different
view on the matter?
--
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