Re: Improving RLS qual pushdown - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Improving RLS qual pushdown
Date
Msg-id 20150109161211.GW3062@tamriel.snowman.net
Whole thread Raw
In response to Improving RLS qual pushdown  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
Dean,

* Dean Rasheed (dean.a.rasheed@gmail.com) wrote:
> A while ago [1] I proposed an enhancement to the way qual pushdown
> safety is decided in RLS / security barrier views. Currently we just
> test for the presence of leaky functions in the qual, but it is
> possible to do better than that, by further testing if the leaky
> function is actually being passed information that we don't want to be
> leaked.

This certainly sounds reasonable to me.

> In fact the majority of builtin functions aren't marked leakproof, and
> probably most user functions aren't either, so this could potentially
> be useful in a wide range of real-world queries, where it is common to
> write quals of the form <column> <operator> <expression>, and the
> expression may contain leaky functions.

Agreed.

Looks like you've already added it to the next commitfest, which is
great.  I'm definitely interested but probably won't get to it right
away as I have a few other things to address.
Thanks!
    Stephen

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Comment typo in src/backend/executor/execMain.c
Next
From: Tom Lane
Date:
Subject: Re: Fixing memory leak in pg_upgrade