BUG #1831: plperl gives error after reconnect. - Mailing list pgsql-bugs

From Greg Sabino Mullane
Subject BUG #1831: plperl gives error after reconnect.
Date
Msg-id 20050817195254.BFDAFF0C13@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1831: plperl gives error after reconnect.
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1831
Logged by:          Greg Sabino Mullane
Email address:      greg@turnstep.com
PostgreSQL version: 8.0.3
Operating system:   Linux
Description:        plperl gives error after reconnect.
Details:

Tested on 8.0.1 and in current cvs. This only happens if all the steps below
are followed, including the reconnect.


\c postgres

CREATE TABLE g (name TEXT);

CREATE OR REPLACE FUNCTION testone() RETURNS text LANGUAGE plperl AS
$$
        spi_exec_query(qq{INSERT INTO g(name) VALUES ('abc')});
        return "ok";
$$;

CREATE OR REPLACE FUNCTION enamer() RETURNS TRIGGER LANGUAGE plperl AS
$$
        return;
$$;
CREATE TRIGGER trigtest BEFORE INSERT ON g FOR EACH ROW EXECUTE PROCEDURE
enamer();

\c postgres

select testone();


ERROR:  error from Perl function: creation of Perl function failed:
(in cleanup) Undefined subroutine &main::mksafefunc called at (eval 4) line
2. at (eval 4) line 2.

pgsql-bugs by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: BUG #1830: Non-super-user must be able to copy from a file
Next
From: Tom Lane
Date:
Subject: Re: BUG #1831: plperl gives error after reconnect.