Re: pl/python do not delete function arguments - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pl/python do not delete function arguments
Date
Msg-id 1297798752.11557.4.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: pl/python do not delete function arguments  (Jan Urbański <wulczer@wulczer.org>)
Responses Re: pl/python do not delete function arguments
List pgsql-hackers
On tis, 2011-02-15 at 09:58 +0100, Jan Urbański wrote:
> Because the invocation that actually recurses sets up the scene for
> failure.

That's what we're observing, but I can't figure out why it is.  If you
can, could you explain it?

It actually makes sense to me that the arguments should be deleted at
the end of the call.  The data belongs to that call only, and
PLy_procedure_delete() that would otherwise clean it up is only called
rarely.

Apparently, the recursive call ends up deleting the wrong arguments, but
it's not clear to me why that would affect the next top-level call,
because that would set up its own arguments again anyway.  In any case,
perhaps the right fix is to fix PLy_function_delete_args() to delete the
args correctly.




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: review: FDW API
Next
From: Kohei Kaigai
Date:
Subject: Re: sepgsql contrib module