Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2McT-0008Rd-Au for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2022 01:19:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p2McR-00064x-Rk for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2022 01:19:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2McR-00064n-IS for pgsql-hackers@lists.postgresql.org; Tue, 06 Dec 2022 01:19:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2McO-0001S8-Va for pgsql-hackers@lists.postgresql.org; Tue, 06 Dec 2022 01:19:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2B61JQUa3524500; Mon, 5 Dec 2022 20:19:27 -0500 From: Tom Lane To: Andres Freund cc: Andrew Dunstan , Alvaro Herrera , Joe Conway , Robert Haas , Corey Huinker , Nikita Glukhov , PostgreSQL Hackers Subject: Re: Error-safe user functions In-reply-to: <20221206011404.i7gxuuzna25ej2hr@alap3.anarazel.de> References: <20221205174231.6wpmbuxafnfzlbuh@alvherre.pgsql> <85e40849-4458-bbb9-62ee-d9e7faf0c7dc@dunslane.net> <3323802.1670263204@sss.pgh.pa.us> <3496391.1670276406@sss.pgh.pa.us> <20221205234734.sab3fuxy6q2sokjd@alap3.anarazel.de> <3518534.1670285891@sss.pgh.pa.us> <20221206005607.lxcrazckoalptwds@alap3.anarazel.de> <3523582.1670288815@sss.pgh.pa.us> <20221206011404.i7gxuuzna25ej2hr@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 05 Dec 2022 17:14:04 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3524498.1670289566.1@sss.pgh.pa.us> Date: Mon, 05 Dec 2022 20:19:26 -0500 Message-ID: <3524499.1670289566@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2022-12-05 20:06:55 -0500, Tom Lane wrote: >> Hmm, either I'm confused or you're stating that backwards --- aren't >> the hard-error code paths already tested by our existing tests? > What I'd like to test is a hard error, either due to an input function > that wasn't converted or because it's a type of error that can't be > handled "softly", but when using the "safe" interface. Oh, I see. That seems like kind of a problematic requirement, unless we leave some datatype around that's intentionally not ever going to be converted. For datatypes that we do convert, there shouldn't be any easy way to get to a hard error. I don't really quite understand why you're worried about that though. The hard-error code paths are well tested already. regards, tom lane