Re: Changing function from SECURITY DEFINER to SECURITY INVOKER changes query plan?
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Changing function from SECURITY DEFINER to SECURITY INVOKER changes query plan? |
| Дата | |
| Msg-id | 15466.1385086304@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Changing function from SECURITY DEFINER to SECURITY INVOKER changes query plan? (Joe Van Dyk <joe@tanga.com>) |
| Ответы |
Re: Changing function from SECURITY DEFINER to SECURITY
INVOKER changes query plan?
|
| Список | pgsql-general |
Joe Van Dyk <joe@tanga.com> writes:
> I had a function that was set to SECURITY INVOKER. I needed to give access
> to a view that uses this function to a role, so I made the function
> SECURITY DEFINER.
> The function is STABLE and is usually inlined and takes 2 ms to run.
> Immediately, the function quit being inlined and took 1500ms to run.
> Changing the function back to SECURITY DEFINER let the function be inlined
> again.
> On postgresql 9.3.1.
> Is this expected behavior?
Yes. SECURITY DEFINER functions can't be inlined --- there would be
noplace to effect the change of user ID.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера