Re: Numeric is not leakproof - Mailing list pgsql-bugs

From Stephen Frost
Subject Re: Numeric is not leakproof
Date
Msg-id 20191203204311.GU6962@tamriel.snowman.net
Whole thread Raw
In response to Numeric is not leakproof  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Numeric is not leakproof  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-bugs
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

Attachment

pgsql-bugs by date:

Previous
From: Stephen Frost
Date:
Subject: Re: LDAPS trusted ca support
Next
From: Chris Bandy
Date:
Subject: Re: BUG #16041: Error shows up both in pgAdmin and in Ruby (pg gem) -Segmentation fault