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

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: BUG #1831: plperl gives error after reconnect.
Дата
Msg-id 20050820030348.GA20752@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: BUG #1831: plperl gives error after reconnect.  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: BUG #1831: plperl gives error after reconnect.  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-bugs
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:

http://archives.postgresql.org/pgsql-committers/2005-06/msg00322.php

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
  I reconnect.

* 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.

--
Michael Fuhr

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [GENERAL] BUG #1830: Non-super-user must be able to copy
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: BUG #1831: plperl gives error after reconnect.