Re: pl/python do not delete function arguments

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jan Urbański <wulczer(at)wulczer(dot)org>
Cc: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pl/python do not delete function arguments
Date: 2011-02-15 19:39:12
Message-ID: 1297798752.11557.4.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-02-15 20:00:49 pgsql: Adjust pg_upgrade error message, array freeing, and add error ch
Previous Message Tom Lane 2011-02-15 19:13:34 Re: review: FDW API