Re: BUG #1831: plperl gives error after reconnect.

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: BUG #1831: plperl gives error after reconnect.
Дата
Msg-id 20050820031730.GA21051@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: BUG #1831: plperl gives error after reconnect.  (Michael Fuhr <mike@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.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, Aug 19, 2005 at 09:03:48PM -0600, Michael Fuhr wrote:
> Here's a summary of what I see on both systems:

I mentioned this before but forgot to include it in the summary:

* If I execute "SELECT foo()" before I execute "SELECT bar()" then
  I don't get the error.

Here's my current test case, run in HEAD in a database named "test"
that has plperl:

CREATE FUNCTION foo() RETURNS text AS $$
return "foo";
$$ LANGUAGE plperl;

CREATE FUNCTION bar() RETURNS text AS $$
my $rv = spi_exec_query("SELECT foo($_[0])");
return $rv->{rows}[0]->{foo};
$$ LANGUAGE plperl;

SELECT bar();
 bar
-----
 foo
(1 row)

\c test
You are now connected to database "test".

SELECT bar();
ERROR:  error from Perl function: creation of Perl function failed:     (in cleanup) Undefined subroutine
&main::mksafefunccalled at (eval 7) line 2. at (eval 7) line 2. 

SELECT foo();
 foo
-----
 foo
(1 row)

SELECT bar();
 bar
-----
 foo
(1 row)

--
Michael Fuhr

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: BUG #1831: plperl gives error after reconnect.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1831: plperl gives error after reconnect.