On 02/06/2014 10:19 PM, Craig Ringer wrote:
> On 02/06/2014 12:43 PM, Craig Ringer wrote:
>> 1. Try (again) to do row-security in the rewriter. This was previously
>> impossible because of the definition of row-security behaviour around
>> inheritance, but with the simplified inheritance model now proposed I
>> think it's possible.
> Thanks to the simplified requirements for inheritance, this turns out to
> be fairly easy. There's a version rewritten to use the rewriter in the tag:
>    rls-9.4-upd-sb-views-v6
> on https://github.com/ringerc/postgres.git
> The trickiest bit remaining is how to register the PlanInvalItem to
> force plan invalidation when the user-id changes. This was easy in the
> optimizer, but it's not obvious how to do it cleanly in the rewriter.
> I've got a couple of ideas but don't much like either of them.
> Recommendations from the experienced welcomed.

Or, after thinking about it for a second with my tired brain, "not so much".

We don't rerun rewrite on plan invalidation.

So that means the superuser exemption won't work properly with this patch.

So much for having a hope, that's not a small thing to fix.

So: either I invoke the rewriter from within the optimizer on the
security quals, or I make the rewriter re-run on plan invalidation.
Neither is small or simple.


 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to