Re: [RFC] A tackle to the leaky VIEWs for RLS

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: [RFC] A tackle to the leaky VIEWs for RLS
Дата
Msg-id 0B269075-4538-4428-ADC7-C7269B6780D1@phlo.org
обсуждение исходный текст
Ответ на [RFC] A tackle to the leaky VIEWs for RLS  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
On Jun 1, 2010, at 10:39 , KaiGai Kohei wrote:
> I have an idea that we add FuncExpr a new field (e.g nestlevel) to remember
> where is originally put in the query, and prevent reordering over the nest
> level of subqueries.
> In above example, f_malicious() has nestlevel=0 because it is put on the top
> level.
> But f_policy() has nestlevel=1 because it is originally put on the second
> level subquery. Then, the order_qual_clauses() will check nestlevel of the
> scan filter prior to reorder them based on the cost estimation.
> Even if we have multiple nestlevels, solution will be same. A FuncExpr with
> larger nestlevel shall be invoked earlier than others.

Wouldn't the information leak go away if you stuck "OFFSET 0" at the end of the view? IIRC, that is the semi-offical
wayto create barriers for subquery flattening and such. 

best regards,
Florian Pflug



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Trigger function in a multi-threaded environment behavior
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [RFC] A tackle to the leaky VIEWs for RLS