Skip site navigation (1) Skip section navigation (2)

pl/python do not delete function arguments

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pl/python do not delete function arguments
Date: 2010-12-30 17:01:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

Git branch for this patch:

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).


Attachment: plpython-dont-remove-arguments.diff
Description: text/x-patch (3.4 KB)


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2010-12-30 17:06:02
Subject: Re: and it's not a bunny rabbit, either
Previous:From: Tom LaneDate: 2010-12-30 16:49:20
Subject: Re: and it's not a bunny rabbit, either

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group