On Wed, Aug 17, 2005 at 11:37:58PM -0600, Michael Fuhr wrote:
> With HEAD on Solaris 9/sparc I don't have to reconnect before the
> SELECT to get the error (I tested both ways, with and without a
> reconnect, and it made no difference).
> I get the same results on FreeBSD 4.11-STABLE/x86 but I have to
> reconnect before the SELECT to get the error.
I discovered why these systems behaved differently: the Solaris box
didn't have validator functions for plperl/plperlu. Apparently I
had createlang'ed them before the validator function was added a
couple of months ago:
I dropped and recreated plperl and plperlu on the Solaris box and
now I do have to reconnect to get the error.
Here's a summary of what I see on both systems:
* The functions are foo() and bar(), both created as plperl.
bar() calls foo() using spi_exec_query().
* In HEAD, where plperl has a validator, if I create the functions
and call bar() in the same session, it works. If I reconnect and
call bar() then I get the error.
* In 8.0.3, where plperl has no validator, if I create the functions
and call bar() in the same session, I get the error. Likewise if
* In either version, if bar() is plperlu then I don't get the error,
regardless of whether I've reconnected since creating the functions.
Creating foo() as plperlu has no effect other than changing the
undefined subroutine's name to mkunsafefunc.
Something about the calling function being plperlu and something
the validator does appear to be relevant, at least on my two systems.
In response to
pgsql-bugs by date
|Next:||From: Michael Fuhr||Date: 2005-08-20 03:17:30|
|Subject: Re: BUG #1831: plperl gives error after reconnect.|
|Previous:||From: Jim C. Nasby||Date: 2005-08-19 20:58:03|
|Subject: Re: [GENERAL] BUG #1830: Non-super-user must be able to copy|