Re: BUG #18456: Trigger data in plpython3u trigger-function changes in AFTER UPDATE OR INSERT trigger
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #18456: Trigger data in plpython3u trigger-function changes in AFTER UPDATE OR INSERT trigger |
| Дата | |
| Msg-id | 2944262.1714847680@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #18456: Trigger data in plpython3u trigger-function changes in AFTER UPDATE OR INSERT trigger (PG Bug reporting form <noreply@postgresql.org>) |
| Ответы |
Re: BUG #18456: Trigger data in plpython3u trigger-function changes in AFTER UPDATE OR INSERT trigger
|
| Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes:
> Then the trigger data changes after the insert statement in the trigger
> function.
Hmm. TD is defined as a global dictionary like SD, so it saves values
across calls to the plpython function. So the inner INSERT operation
fires the same trigger, which decides not to print anything, but
nonetheless it's changed TD and the outer trigger call will see that.
There used to be similar problems in plain plpython functions if they
were invoked recursively, because named function arguments are also
passed as global variables. We fixed that in a rather hacky way in
1d2fe56e4, ie save and restore those globals when recursing.
Probably the same thing could be done with TD.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера