The following bug has been logged online:

Bug reference:      1831
Logged by:          Greg Sabino Mullane
Email address:      [EMAIL PROTECTED]
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.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to