Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSCDp-0000if-IV for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Dec 2017 01:34:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSCDp-0008Fv-67 for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Dec 2017 01:34:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eSCDo-0008Fj-Tg for pgsql-bugs@lists.postgresql.org; Fri, 22 Dec 2017 01:34:01 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eSCDl-0005Sy-Tt for pgsql-bugs@postgresql.org; Fri, 22 Dec 2017 01:33:59 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 0C7E35F795; Thu, 21 Dec 2017 20:33:57 -0500 (EST) Date: Thu, 21 Dec 2017 20:33:56 -0500 From: Stephen Frost To: Andres Freund Cc: Greg Stark , Magnus Hagander , binoternary@gmail.com, pgsql-bugs Subject: Re: BUG #14986: -2147483648 is minimum value of integer but -2147483648::integer fails (out of range). Message-ID: <20171222013356.GO4628@tamriel.snowman.net> References: <20171220122032.25740.1219@wrigleys.postgresql.org> <20171221141315.nj5uvgnqwd6hzjtp@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NPLL6T8UB2VV3F0F" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --NPLL6T8UB2VV3F0F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Andres, all, * Andres Freund (andres@anarazel.de) wrote: > On December 21, 2017 10:18:05 PM GMT+01:00, Greg Stark wr= ote: > >On 21 December 2017 at 14:13, Andres Freund wrote: > >> On 2017-12-21 14:05:07 +0000, Greg Stark wrote: > >>> I wonder why the "out of range" error doesn't print the actual value > >>> it's trying to cast. That would help the user here... > >> > >> We'd have to mark it as non-leakproof in that case. > > > >Damn that's annoying. > > > >But..... uh, isn't it already leaking that the value is not in > >99.99999998% of > >the bigint range? >=20 > Most of the relevant operations have more than one operand, or are aggreg= ates. Especially for actually relevant data ranges. But yes, this is a way = to analyze data, we knew that when adding RLS. Leakproof functions actually were introduced with security barrier views, which pre-dated RLS and is what RLS is built on top of. This doesn't change anything wrt this, of course, just figured I'd clarify for anyone following the thread. Thanks! Stephen --NPLL6T8UB2VV3F0F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJaPGEEAAoJEO1sijiDR2RVoeYQAIF99nPbdvDxB1aGaoQKvoqs niD7NmoBAdzsraOCkBIkeAVo2RbWaTEv6VvOmG1bZxDQMj9YdJRrYaUr9HO4ZACs u2xP27PyL8UxY7Og28grB+1eYUH8gOEeQkL/+KIwij3ZHjKP89VqWEfJgg/iLk9M fCuCMBP6UKj3W+ZTbvb3ApAyvAdX9rMCe/GTXNNFONjlycacc2gK706bbqiKfVN+ LMsU5gIr6eIejn1h3jUDtA6QsbZyr/4CDIxC/2wWOL8jzPMSN+WpPus2H6eGXNmj aJBMiuY5RH0npTpRUdn2PwBrW5Ks5mm5rPuUfolUmUoPlWgfNW1BWMlxCmxVB94/ hpslx0yOoJKVZBrcjxXdXub68T1wBrructBvfZBbTccp2ut8+0+f0PRnO0t0TJna prbFKJ4R6DizO6PkySygREhdy5M5cfA97br1i+3EfaarQ6f+/doZAN1qj5PjIhjs J5ZBsWbGfDJA3LnynKNE6DDcWPHrr1sb1GYn0+vPbK9LjTGst6BZNj51yjsr9U7c DbwSs4CXKCRtKAf9Lm77F6rVtbvaekg+TQ++ehQyk/TyETTJYC2MDtwee4dT9/kd XbNFZ2uUjPyuNEWxDkuwGK0R2ox00R9gSrH2z1ZMDcfMkTAwjhEFQMBbsgBDwxet ri4dy0A1nFZBcp70x+mo =14Aq -----END PGP SIGNATURE----- --NPLL6T8UB2VV3F0F--