Re: BUG #1831: plperl gives error after reconnect.
| От | Michael Fuhr |
|---|---|
| Тема | Re: BUG #1831: plperl gives error after reconnect. |
| Дата | |
| Msg-id | 20050818053758.GA78296@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Re: BUG #1831: plperl gives error after reconnect. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: BUG #1831: plperl gives error after reconnect.
|
| Список | pgsql-bugs |
On Thu, Aug 18, 2005 at 12:26:28AM -0400, Tom Lane wrote:
> Michael Fuhr <mike@fuhr.org> writes:
> > Could this be another "depends on the junk on your stack" bug?
>
> Looks that way --- but I've still had no success in reproducing it,
> either on x86/Linux or PPC/Darwin. Anyone have some variant test
> cases?
I see different results depending on whether the calling function
is plperl or plperlu. Here again are the functions -- I'll change
only the language:
CREATE OR REPLACE FUNCTION foo() RETURNS text AS $$
return "foo";
$$ LANGUAGE plperl;
CREATE OR REPLACE FUNCTION bar() RETURNS text AS $$
my $rv = spi_exec_query("SELECT foo()");
return $rv->{rows}[0]->{foo};
$$ LANGUAGE plperl;
SELECT bar();
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). Here's what I get with
various language combinations:
foo plperl, bar plperl - Undefined subroutine &main::mksafefunc
foo plperl, bar plperlu - ok
foo plperlu, bar plperl - Undefined subroutine &main::mkunsafefunc
foo plperlu, bar plperlu - ok
I get the same results on FreeBSD 4.11-STABLE/x86 but I have to
reconnect before the SELECT to get the error. On both systems,
if I execute SELECT foo() before SELECT bar() then I don't get
the error.
--
Michael Fuhr
В списке pgsql-bugs по дате отправления: