Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDWu2-001LJu-MU for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2024 22:40:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tDWu1-000HMx-BR for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2024 22:40:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDWu1-000HMl-3G for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2024 22:40:57 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDWty-002lis-7w for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2024 22:40:55 +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 4AJMemAY3966229; Tue, 19 Nov 2024 17:40:48 -0500 From: Tom Lane To: Erik Wienhold cc: "David G. Johnston" , Chris BSomething , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18715: replace() function silently fails if 3rd argument is null In-reply-to: References: <18715-7035b5d78571887e@postgresql.org> <3778528.1732034860@sss.pgh.pa.us> Comments: In-reply-to Erik Wienhold message dated "Tue, 19 Nov 2024 23:34:23 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3966227.1732056048.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 19 Nov 2024 17:40:48 -0500 Message-ID: <3966228.1732056048@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Erik Wienhold writes: > On 2024-11-19 17:47 +0100, Tom Lane wrote: >> I thought we documented somewhere that built-in functions are strict >> unless explicitly stated otherwise ... but I sure can't find that >> statement right now. > Perhaps this one?: >> (Most internal functions expect to be declared “strict”.) >> https://www.postgresql.org/docs/current/xfunc-internal.html I did see that one, but it's not exactly in an obvious-to-novices place. David was working on a new docs section that would talk more about SQL NULLs in general. Maybe that would be a reasonable place? An alternative could be somewhere early in func.sgml, but that chapter doesn't really have anything I would call an overview section. regards, tom lane