Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUiwb-0005Zx-OD for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2016 23:17:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUiwa-00013x-T1 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2016 23:17:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUivD-0007yB-2t for pgsql-hackers@postgresql.org; Tue, 02 Aug 2016 23:16:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUivA-0005Pj-CR for pgsql-hackers@postgresql.org; Tue, 02 Aug 2016 23:16:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u72NGF7h011797; Tue, 2 Aug 2016 19:16:15 -0400 From: Tom Lane To: Robert Haas cc: Dilip Kumar , Michael Paquier , Andreas Seltenreich , Piotr Stefaniak , PostgreSQL mailing lists Subject: Re: [sqlsmith] Failed assertion in joinrels.c In-reply-to: References: <87wpxfygg9.fsf@credativ.de> <15630.1438391483@sss.pgh.pa.us> <87614zxroq.fsf@credativ.de> <2086.1438444757@sss.pgh.pa.us> <13027.1438546710@sss.pgh.pa.us> <87egjhv9j8.fsf@credativ.de> <8205.1438906901@sss.pgh.pa.us> <14249.1465054181@sss.pgh.pa.us> <24118.1465136174@sss.pgh.pa.us> <15728.1469809063@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 02 Aug 2016 07:45:21 -0400" Date: Tue, 02 Aug 2016 19:16:15 -0400 Message-ID: <11796.1470179775@sss.pgh.pa.us> X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Tue, Aug 2, 2016 at 6:03 AM, Dilip Kumar 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