Re: pg_partition_tree crashes for a non-defined relation

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: pg_partition_tree crashes for a non-defined relation
Date: 2018-12-08 06:54:36
Message-ID: 20181208065436.GC1989@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-12-08 06:59:42 Re: proposal: plpgsql pragma statement
Previous Message Peter Eisentraut 2018-12-08 06:16:42 Re: make install getting slower