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

Re: BUG #1831: plperl gives error after reconnect.

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>,pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1831: plperl gives error after reconnect.
Date: 2005-08-20 05:16:25
Message-ID: 20050820051625.GA41966@winnie.fuhr.org (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-08-20 05:21:56
Subject: Re: BUG #1831: plperl gives error after reconnect.
Previous:From: Tom LaneDate: 2005-08-20 05:14:02
Subject: Re: BUG #1831: plperl gives error after reconnect.

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