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