From: Alvaro Herrera <alvherre@commandprompt.com>
To: Alex Hunsaker <badalex@gmail.com>
Cc: marko <marko@kobaz.net>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD
Date: Mon, 19 Mar 2012 17:40:37 -0300
Message-ID: <1332189577-sup-8497@alvh.no-ip.org> (raw)
In-Reply-To: <CAFaPBrQRwr7OevWjeFwU2+E34Vt+wfy1_GmhNm4=Yw0_dPLL_w@mail.gmail.com>
References: <E1S3uUe-0005ER-RD@wrigleys.postgresql.org>
<CAFaPBrQRwr7OevWjeFwU2+E34Vt+wfy1_GmhNm4=Yw0_dPLL_w@mail.gmail.com>
Excerpts from Alex Hunsaker's message of mié mar 07 01:08:25 -0300 2012:
> On Sat, Mar 3, 2012 at 12:19, <marko@kobaz.net> wrote:
> Yeah, there were some optimization done for 9.1 to try and make calls
> a bit faster. The problem is we are fetching "_TD" not "main::_TD",
> which means we try to find and use $_TD from whatever the current
> package is. This should only happen from a nested plperl to plperl
> trigger where the outer call was in a different package, otherwise the
> package is always main.
>
> The attached fixes it for me, It would be great if you could confirm that.
Thanks -- applied to 9.1 and master.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@commandprompt.com, badalex@gmail.com, marko@kobaz.net
Subject: Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD
In-Reply-To: <1332189577-sup-8497@alvh.no-ip.org>
References: <E1S3uUe-0005ER-RD@wrigleys.postgresql.org> <CAFaPBrQRwr7OevWjeFwU2+E34Vt+wfy1_GmhNm4=Yw0_dPLL_w@mail.gmail.com> <1332189577-sup-8497@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox