pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark M. <marko@kobaz.net>
To: Alex Hunsaker <badalex@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD
Date: Sun, 18 Mar 2012 00:11:48 -0400
Message-ID: <4F656084.2050207@kobaz.net> (raw)
In-Reply-To: <CAFaPBrTXmwj+iAMe2g7RsGg5qBm5KGvNJVy7Nezo0mZyjwYqhA@mail.gmail.com>
References: <E1S3uUe-0005ER-RD@wrigleys.postgresql.org>
	<CAFaPBrQRwr7OevWjeFwU2+E34Vt+wfy1_GmhNm4=Yw0_dPLL_w@mail.gmail.com>
	<20120315221351.GB20113@momjian.us>
	<CAFaPBrTXmwj+iAMe2g7RsGg5qBm5KGvNJVy7Nezo0mZyjwYqhA@mail.gmail.com>

On 03/16/12 13:48, Alex Hunsaker wrote:
> On Thu, Mar 15, 2012 at 16:13, Bruce Momjian<bruce@momjian.us>  wrote:
>> On Tue, Mar 06, 2012 at 09:08:25PM -0700, Alex Hunsaker wrote:
>>> [ Calling a plperl trigger function from a plperl function ]
>>>
>>> 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 for the report!
>> So, should this be applied?
> Yes, but I would like to get conformation that it fixes the issue.
> Either way Ill probably just end up submitting it to the next commit
> fest. (I know most commiters are still busy with the current one).


Fixes the problem.    Thanks.  I always like one line fixes.



view thread (7+ messages)  latest in thread

Message-ID: <4F656084.2050207@kobaz.net>
Permalink:  ../4F656084.2050207@kobaz.net/
Also on:    postgresql.org/message-id/4F656084.2050207@kobaz.net

 · 

reply

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: marko@kobaz.net, badalex@gmail.com, bruce@momjian.us
  Subject: Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD
  In-Reply-To: <4F656084.2050207@kobaz.net>
  References: <E1S3uUe-0005ER-RD@wrigleys.postgresql.org> <CAFaPBrQRwr7OevWjeFwU2+E34Vt+wfy1_GmhNm4=Yw0_dPLL_w@mail.gmail.com> <20120315221351.GB20113@momjian.us> <CAFaPBrTXmwj+iAMe2g7RsGg5qBm5KGvNJVy7Nezo0mZyjwYqhA@mail.gmail.com> <4F656084.2050207@kobaz.net>

* 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