pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Andreas Seltenreich <seltenreich@gmx.de>
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Date: Tue, 02 Aug 2016 19:16:15 -0400
Message-ID: <11796.1470179775@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYWEeF2R83eA9-D4XWaK1nUSDg3Tu-bj2WHUA2g=9sKVA@mail.gmail.com>
References: <87wpxfygg9.fsf@credativ.de>
	<15630.1438391483@sss.pgh.pa.us>
	<87614zxroq.fsf@credativ.de>
	<2086.1438444757@sss.pgh.pa.us>
	<BLU436-SMTP121548815908D3CF56F631BF2880@phx.gbl>
	<13027.1438546710@sss.pgh.pa.us>
	<87egjhv9j8.fsf@credativ.de>
	<8205.1438906901@sss.pgh.pa.us>
	<CAB7nPqThJsGnH2JNyHPZmXFk8a26RhqRhR7in0zCpT+OttfzEw@mail.gmail.com>
	<14249.1465054181@sss.pgh.pa.us>
	<CAB7nPqRhSh1RrYRnGnk_5DZP8WoKNMuYeL4ed3LEmgQjpZHfpg@mail.gmail.com>
	<CAB7nPqTfzOVgdSK3jKM2L1Awy9nV6RQQni09f8cHjtny6jeQOw@mail.gmail.com>
	<24118.1465136174@sss.pgh.pa.us>
	<CAB7nPqTxF5dtxjEzB7xkJvOWxX8D_2atxmTu3PSnkhcWT_JY5A@mail.gmail.com>
	<CA+TgmoZ6rtR0ozn41GB63m1QitKUP45Z9dA3w4apbeHwq8SwYA@mail.gmail.com>
	<CAB7nPqSW-rUBUaECXzi1ZNMpNLdEsDYec=2mWNQ+J4qeGKF2OQ@mail.gmail.com>
	<CA+Tgmoah9DyjU-SNL+S6H5MX92dfmS4aQTj3bBq+uoKyN2mAgA@mail.gmail.com>
	<15728.1469809063@sss.pgh.pa.us>
	<CAB7nPqT1WVHuCVpM+ppKzpz5cf63hSomz4xH9St9g8NwE862VQ@mail.gmail.com>
	<CAFiTN-v5R5OLV=daTRaQVgNeAshY686-gS+vC--04EDn9dGqDQ@mail.g! mail.com>
	<CA+TgmoYWEeF2R83eA9-D4XWaK1nUSDg3Tu-bj2WHUA2g=9sKVA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Aug 2, 2016 at 6:03 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
>> There are many more such exposed functions, which can throw cache lookup
>> failure error if we pass wrong value.
>> 
>> i.e.
>> record_in
>> domain_in
>> fmgr_c_validator
>> plpgsql_validator
>> pg_procedure_is_visible
>> 
>> Are we planning to change these also..

> I think if they are SQL-callable functions that users can invoke from
> a SQL prompt, they shouldn't throw "cache lookup failed" errors or,
> for that matter, any other error that is reported with elog().

FWIW, I would restrict that to "functions that users are *intended* to
call from a SQL prompt".  If you are fooling around calling internal
functions with garbage input, you should not be surprised to get an
internal error back.  So of the above list, only pg_procedure_is_visible
seems particularly worth changing to me.  And for it, returning NULL
(ie, "unknown") seems reasonable enough.

Actually, it looks to me like we already fixed that for the built-in
is_visible functions:

# select pg_function_is_visible(0) is null;
 ?column? 
----------
 t
(1 row)

There's no such animal as pg_procedure_is_visible.  I suspect that's an
EDB-ism that hasn't caught up with commit 66bb74dbe8206a35.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (55+ messages)  latest in thread

Message-ID: <11796.1470179775@sss.pgh.pa.us>
Permalink:  ../11796.1470179775@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11796.1470179775@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, dilipbalaut@gmail.com, michael.paquier@gmail.com, seltenreich@gmx.de, postgres@piotr-stefaniak.me
  Subject: Re: [sqlsmith] Failed assertion in joinrels.c
  In-Reply-To: <11796.1470179775@sss.pgh.pa.us>
  References: <87wpxfygg9.fsf@credativ.de> <87614zxroq.fsf@credativ.de> <2086.1438444757@sss.pgh.pa.us> <BLU436-SMTP121548815908D3CF56F631BF2880@phx.gbl> <13027.1438546710@sss.pgh.pa.us> <87egjhv9j8.fsf@credativ.de> <8205.1438906901@sss.pgh.pa.us> <CAB7nPqThJsGnH2JNyHPZmXFk8a26RhqRhR7in0zCpT+OttfzEw@mail.gmail.com> <14249.1465054181@sss.pgh.pa.us> <CAB7nPqRhSh1RrYRnGnk_5DZP8WoKNMuYeL4ed3LEmgQjpZHfpg@mail.gmail.com> <CAB7nPqTfzOVgdSK3jKM2L1Awy9nV6RQQni09f8cHjtny6jeQOw@mail.gmail.com> <24118.1465136174@sss.pgh.pa.us> <CAB7nPqTxF5dtxjEzB7xkJvOWxX8D_2atxmTu3PSnkhcWT_JY5A@mail.gmail.com> <CA+TgmoZ6rtR0ozn41GB63m1QitKUP45Z9dA3w4apbeHwq8SwYA@mail.gmail.com> <CAB7nPqSW-rUBUaECXzi1ZNMpNLdEsDYec=2mWNQ+J4qeGKF2OQ@mail.gmail.com> <CA+Tgmoah9DyjU-SNL+S6H5MX92dfmS4aQTj3bBq+uoKyN2mAgA@mail.gmail.com> <15728.1469809063@sss.pgh.pa.us> <CAB7nPqT1WVHuCVpM+ppKzpz5cf63hSomz4xH9St9g8NwE862VQ@mail.gmail.com> <CA+TgmoYWEeF2R83eA9-D4XWaK1nUSDg3Tu-bj2WHUA2g=9sKVA@mail.gmail.com> <11796.1470179775@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