From: Stephen Frost <sfrost@snowman.net>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Numeric is not leakproof
Date: Tue, 3 Dec 2019 15:43:11 -0500
Message-ID: <20191203204311.GU6962@tamriel.snowman.net> (raw)
In-Reply-To: <13a01430-672d-c73c-7abe-0b70e9e8aa01@postgrespro.ru>
References: <13a01430-672d-c73c-7abe-0b70e9e8aa01@postgrespro.ru>
Greetings,
* Konstantin Knizhnik (k.knizhnik@postgrespro.ru) wrote:
> Numeric functions are not marked as leakproof in pg_proc.dat
> It cause unexpected behavior in case of using row-level security:
The behavior you're getting is *entirely* expected, just to be clear.
Perhaps unfortunate and not as performant as you were hoping, but
definitely not unexpected.
As Tom noted downthread, you can't just mark things 'leakproof' because
you want them to be able to be used in an index- you need to actually
show that they're leakproof.
> I have not checked all other builtin type.
> But it seems to me that it may be reasonable to mark ALL builtin functions
> (described in pg_proc.dat) as leekprof by default.
Absolutely not without careful verification of each and every one.
There's nothing that guarantees builtins are leakproof (and indeed,
there's no shortage of ones that are clearly *not* leakproof today).
I'd love it for someone to go through and fix them all to actually be
leakproof (or at least all of the ones that might be used with an index)
but that clearly hasn't been done here.
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, k.knizhnik@postgrespro.ru
Subject: Re: Numeric is not leakproof
In-Reply-To: <20191203204311.GU6962@tamriel.snowman.net>
References: <13a01430-672d-c73c-7abe-0b70e9e8aa01@postgrespro.ru> <20191203204311.GU6962@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