From: | elein <elein(at)varlena(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | elein <elein(at)varlena(dot)com> |
Subject: | Bug in PL/Perl CVS head w/spi patch |
Date: | 2004-07-05 01:07:31 |
Message-ID: | 20040704180731.Q21709@cookie.varlena.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
--
-- An SQL error causes subsequent function creation of an otherwise
-- healthy function to fail WHEN RUN with:
-- ERROR: creation of function failed:
-- (in cleanup) Undefined subroutine &PLPerl::mksafefunc called at (eval 4) line 4.
--
-- Workaround is to close and reopen the connection after an SQL failure
--
create or replace function plperl_bug1( )
returns text as
'
my $qry = ''select * from pg_user'';
elog NOTICE, ''Good Query is: $qry'';
my $rv = spi_exec_query( $qry );
elog NOTICE, $rv->{status};
elog NOTICE, @{$rv->{rows}};
return $qry;
' language 'plperl';
select plperl_bug1();
create or replace function plperl_bug2( )
returns text as
'
my $qry = ''select * from pg_userssssssssssssssss'';
elog NOTICE, ''Bad Query is: $qry'';
my $rv = spi_exec_query( $qry );
elog NOTICE, $rv->{status};
elog NOTICE, @{$rv->{rows}};
return $qry;
' language 'plperl';
select plperl_bug2();
--
-- same as above definition
--
create or replace function plperl_bug1( )
returns text as
'
my $qry = ''select * from pg_user'';
elog NOTICE, ''Good Query is: $qry'';
my $rv = spi_exec_query( $qry );
elog NOTICE, $rv->{status};
elog NOTICE, @{$rv->{rows}};
return $qry;
' language 'plperl';
select plperl_bug1();
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-07-05 02:18:04 | Re: [HACKERS] Compile failure in plperl |
Previous Message | Oliver Jowett | 2004-07-04 22:21:26 | Re: [Re] Re: PREPARE and transactions |