From: Stephen Frost <sfrost@snowman.net>
To: Andres Freund <andres@anarazel.de>
Cc: Greg Stark <stark@mit.edu>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: binoternary@gmail.com, pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14986: -2147483648 is minimum value of integer but -2147483648::integer fails (out of range).
Date: Thu, 21 Dec 2017 20:33:56 -0500
Message-ID: <20171222013356.GO4628@tamriel.snowman.net> (raw)
In-Reply-To: <CC7D554D-9648-43D2-9391-5564A696304E@anarazel.de>
References: <20171220122032.25740.1219@wrigleys.postgresql.org>
<CABUevEz7CgCgz8MVkp89-UVb=GrNfvv3-XRw=dJGJKnq=WV9TQ@mail.gmail.com>
<CAM-w4HNudmE0OReuV7YCAkO2=0rgxNGC_43G-R8oKXRnJTUNKw@mail.gmail.com>
<20171221141315.nj5uvgnqwd6hzjtp@alap3.anarazel.de>
<CAM-w4HMUwZZZxD7dogCQnNXU_0YC-wkDYOfxz=83vR1tiZrEjg@mail.gmail.com>
<CC7D554D-9648-43D2-9391-5564A696304E@anarazel.de>
Andres, all,
* Andres Freund (andres@anarazel.de) wrote:
> On December 21, 2017 10:18:05 PM GMT+01:00, Greg Stark <stark@mit.edu> wrote:
> >On 21 December 2017 at 14:13, Andres Freund <andres@anarazel.de> 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?
>
> Most of the relevant operations have more than one operand, or are aggregates. 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
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: sfrost@snowman.net, andres@anarazel.de, stark@mit.edu, magnus@hagander.net
Subject: Re: BUG #14986: -2147483648 is minimum value of integer but -2147483648::integer fails (out of range).
In-Reply-To: <20171222013356.GO4628@tamriel.snowman.net>
References: <20171220122032.25740.1219@wrigleys.postgresql.org> <CABUevEz7CgCgz8MVkp89-UVb=GrNfvv3-XRw=dJGJKnq=WV9TQ@mail.gmail.com> <CAM-w4HNudmE0OReuV7YCAkO2=0rgxNGC_43G-R8oKXRnJTUNKw@mail.gmail.com> <20171221141315.nj5uvgnqwd6hzjtp@alap3.anarazel.de> <CAM-w4HMUwZZZxD7dogCQnNXU_0YC-wkDYOfxz=83vR1tiZrEjg@mail.gmail.com> <CC7D554D-9648-43D2-9391-5564A696304E@anarazel.de> <20171222013356.GO4628@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox