pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Subject: Re: pg_partition_tree crashes for a non-defined relation
Date: Fri, 07 Dec 2018 23:33:32 -0500
Message-ID: <6105.1544243612@sss.pgh.pa.us> (raw)
In-Reply-To: <20181207230540.GA12740@paquier.xyz>
References: <20181207010406.GO2407@paquier.xyz>
	<20181207230540.GA12740@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Fri, Dec 07, 2018 at 10:04:06AM +0900, Michael Paquier wrote:
>> 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.

> Are there any objections about fixing this issue?  I would rather fix it
> sonner than later.

Return NULL seems a reasonable behavior.

How about cases where the relation OID exists but it's the wrong
kind of relation?

			regards, tom lane




view thread (36+ messages)  latest in thread

Message-ID: <6105.1544243612@sss.pgh.pa.us>
Permalink:  ../6105.1544243612@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6105.1544243612@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, Langote_Amit_f8@lab.ntt.co.jp
  Subject: Re: pg_partition_tree crashes for a non-defined relation
  In-Reply-To: <6105.1544243612@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox