Skip site navigation (1) Skip section navigation (2)

Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Alex Hunsaker <badalex(at)gmail(dot)com>
Cc: marko <marko(at)kobaz(dot)net>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD
Date: 2012-03-19 20:40:37
Message-ID: 1332189577-sup-8497@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Excerpts from Alex Hunsaker's message of mié mar 07 01:08:25 -0300 2012:
> On Sat, Mar 3, 2012 at 12:19,  <marko(at)kobaz(dot)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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2012-03-19 21:23:03
Subject: Re: BUG #6535: LEFT JOIN on large table is altering data
Previous:From: Alvaro HerreraDate: 2012-03-19 20:05:33
Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group