pl/python do not delete function arguments

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема pl/python do not delete function arguments
Дата
Msg-id 4D1CBAE5.2090007@wulczer.org
обсуждение исходный текст
Ответы Re: pl/python do not delete function arguments  (Hitoshi Harada <umi.tanuki@gmail.com>)
Список pgsql-hackers
(continuing the flurry of patches)

Here's a patch that stops PL/Python from removing the function's
arguments from its globals dict after calling it. It's
an incremental patch on top of the plpython-refactor patch sent in
http://archives.postgresql.org/message-id/4D135170.3080705@wulczer.org.

Git branch for this patch:
https://github.com/wulczer/postgres/tree/dont-remove-arguments

Apart from being useless, as the whole dict is unreffed and thus freed
in PLy_procedure_delete, removing args actively breaks things for
recursive invocation of the same function. The recursive callee after
returning will remove the args from globals, and subsequent access to
the arguments in the caller will cause a NameError (see new regression
test in patch).

Cheers,
Jan

Вложения

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

Предыдущее
От: Jie Li
Дата:
Сообщение: Re: RIGHT/FULL OUTER hash joins (was Re: small table left outer join big table)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: and it's not a bunny rabbit, either