Re: Row-security on updatable s.b. views

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Row-security on updatable s.b. views
Дата
Msg-id 52F39C07.5060301@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Row-security on updatable s.b. views  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Row-security on updatable s.b. views  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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.

Blast.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Minor performance improvement in transition to external sort
Следующее
От: Rafael Martinez Guerrero
Дата:
Сообщение: open and close columns in the NEW record not allowed