postgresql/src/pl/plpython
Neil Conway c08c8529e7 In PLy_function_build_args(), the code loops repeatedly, constructing
one argument at a time and then inserting the argument into a Python
list via PyList_SetItem(). This "steals" the reference to the argument:
that is, the reference to the new list member is now held by the Python
list itself. This works fine, except if an elog occurs. This causes the
function's PG_CATCH() block to be invoked, which decrements the
reference counts on both the current argument and the list of arguments.
If the elog happens to occur during the second or subsequent iteration
of the loop, the reference count on the current argument will be
decremented twice.

The fix is simple: set the local pointer to the current argument to NULL
immediately after adding it to the argument list. This ensures that the
Py_XDECREF() in the PG_CATCH() block doesn't double-decrement.
2006-01-10 00:33:12 +00:00
..
expected Add an expected case to cover error message as spelled by python 2.2.3. 2005-10-04 02:50:04 +00:00
sql This patch addresses the problem mentioned in the "process crash 2005-07-10 04:56:55 +00:00
Makefile Allow installation into directories containing spaces in the name. 2005-12-09 21:19:36 +00:00
plpython.c In PLy_function_build_args(), the code loops repeatedly, constructing 2006-01-10 00:33:12 +00:00
TODO Rename plpython to plpythonu, and update documentation to reflect its 2003-06-30 18:31:42 +00:00