Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iaLdt-0003WG-FR for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Nov 2019 15:23:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iaLds-0008FT-64 for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Nov 2019 15:23:40 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iaLc1-0006a4-Pt for pgsql-bugs@lists.postgresql.org; Thu, 28 Nov 2019 15:21:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iaLbz-0001Fp-84 for pgsql-bugs@lists.postgresql.org; Thu, 28 Nov 2019 15:21:45 +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 xASFLekG032454; Thu, 28 Nov 2019 10:21:40 -0500 From: Tom Lane To: Konstantin Knizhnik cc: pgsql-bugs@lists.postgresql.org Subject: Re: Numeric is not leakproof In-reply-to: <13a01430-672d-c73c-7abe-0b70e9e8aa01@postgrespro.ru> References: <13a01430-672d-c73c-7abe-0b70e9e8aa01@postgrespro.ru> Comments: In-reply-to Konstantin Knizhnik message dated "Thu, 28 Nov 2019 12:06:06 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32452.1574954500.1@sss.pgh.pa.us> Date: Thu, 28 Nov 2019 10:21:40 -0500 Message-ID: <32453.1574954500@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Konstantin Knizhnik writes: > Numeric functions are not marked as leakproof in pg_proc.dat Indeed. Nobody has done the analysis needed to decide that it'd be safe to do so. For comparison, see the rather considerable discussion that occurred before marking the text comparison functions leakproof. > But it seems to me that it may be reasonable to mark ALL builtin > functions (described in pg_proc.dat) as leekprof by default. This proposal is risible. But if you actually need a counterexample, here's one: regression=# select 'abc' ~ '(foo'; ERROR: invalid regular expression: parentheses () not balanced regards, tom lane