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

BUG #1831: plperl gives error after reconnect.

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1831: plperl gives error after reconnect.
Date: 2005-08-17 19:52:54
Message-ID: 20050817195254.BFDAFF0C13@svr2.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      1831
Logged by:          Greg Sabino Mullane
Email address:      greg(at)turnstep(dot)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.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-08-17 22:46:20
Subject: Re: BUG #1831: plperl gives error after reconnect.
Previous:From: Bruno Wolff IIIDate: 2005-08-17 11:51:12
Subject: Re: BUG #1830: Non-super-user must be able to copy from a file

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