| От | Tom Lane |
|---|---|
| Тема | Re: Before/After Trigger User Switching |
| Дата | |
| Msg-id | 19303.1061412802@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Before/After Trigger User Switching ("Aasmund Midttun Godal" <postgresql@aasmund.com>) |
| Список | pgsql-sql |
"Aasmund Midttun Godal" <postgresql@aasmund.com> writes:
> Thank you for your quick reply!
> I understand your point of view, however the fact remains that you want the
> action to be done as though it was the DEFINER user that did it, and that
> has not changed even thoug the function itself has finished?
<shrug> ... if there's any bug here, I'd argue that it's that we don't
force trigger functions to run as the owner of the table they're on.
The privileges of the user that did the INSERT or whatever are the wrong
thing in any case, I'd say.
Which suggests a workaround for the moment: your trigger function should
be a SECURITY DEFINER.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера