Re: invalidating cached plans

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: invalidating cached plans
Дата
Msg-id 2484.1110949918@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: invalidating cached plans  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> That makes me wonder. What happens if I prepare a query, then use SET SESSION
> AUTHORIZATION to change my user. Then try to execute the query?

Permissions checks are applied at executor startup, not by the planner,
so it should Work Correctly in my view of the world.

There is one exception: a potentially inlinable SQL function will be
inlined if it is allowably executable when the planner wants to do it
--- subsequent revocation of call privileges on the function won't
cause a failure of the plan.  You could argue it both ways about
whether this is a problem, but it seems to me it's not a big issue.
We don't inline functions that could, say, give you access to a table
you couldn't have read otherwise.
        regards, tom lane


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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Real-Time Vacuum Possibility
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: contrib/pg_buffercache