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

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

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>,pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1831: plperl gives error after reconnect.
Date: 2005-08-20 03:03:48
Message-ID: 20050820030348.GA20752@winnie.fuhr.org (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-bugs by date

Next:From: Michael FuhrDate: 2005-08-20 03:17:30
Subject: Re: BUG #1831: plperl gives error after reconnect.
Previous:From: Jim C. NasbyDate: 2005-08-19 20:58:03
Subject: Re: [GENERAL] BUG #1830: Non-super-user must be able to copy

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