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

From Michael Fuhr
Subject Re: BUG #1831: plperl gives error after reconnect.
Date
Msg-id 20050820051625.GA41966@winnie.fuhr.org
Whole thread Raw
In response to Re: BUG #1831: plperl gives error after reconnect.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #1831: plperl gives error after reconnect.
Re: BUG #1831: plperl gives error after reconnect.
List pgsql-bugs
On Sat, Aug 20, 2005 at 12:22:05AM -0400, Tom Lane wrote:
> Would anyone like to explain what ::_plperl_to_pg_array is for, and
> why it's only created by loose_embedding[] and not strict_embedding[]?

It looks like plperl_convert_to_pg_array() calls that Perl function
to convert a Perl list reference to the string representation of
PostgreSQL array, so functions like this can work:

CREATE FUNCTION foo() RETURNS integer[] AS $$
return [1, 2, 3];
$$ LANGUAGE plperl;

SELECT foo();
   foo
---------
 {1,2,3}
(1 row)

But this example crashes the backend if plperl.use_strict is enabled :-(

--
Michael Fuhr

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1831: plperl gives error after reconnect.
Next
From: Tom Lane
Date:
Subject: Re: BUG #1831: plperl gives error after reconnect.