PL/Perl Returned Array - Mailing list pgsql-hackers

From David E. Wheeler
Subject PL/Perl Returned Array
Date
Msg-id 6242D79C-0D5F-44B8-AD1A-0E1D556E733D@kineticode.com
Whole thread Raw
Responses Re: PL/Perl Returned Array
List pgsql-hackers
Hackers,

Given this script on 9.1beta3:
   BEGIN;
   CREATE EXTENSION plperl;
   CREATE OR REPLACE FUNCTION wtf(   ) RETURNS TEXT[] LANGUAGE plperl AS $$ return []; $$;
   SELECT wtf() = '{}'::TEXT[];
   ROLLBACK;

The output is:
   BEGIN   CREATE EXTENSION   CREATE FUNCTION    ?column?    ----------    f   (1 row)
   ROLLBACK

Why is that? If I save the values to TEXT[] columns, they are still not the same. But if I pg_dump them and then load
themup again, they *are* the same. The dump looks like this: 
   CREATE TABLE gtf (       have text[],       want text[]   );
   COPY gtf (have, want) FROM stdin;   {}    {}   \.


Is PL/Perl doing something funky under the hood to array values it returns on 9.1?

Thanks,

David



pgsql-hackers by date:

Previous
From: daveg
Date:
Subject: OperationalError: FATAL: lock AccessShareLock on object 0/1260/0 is already
Next
From: Alex Hunsaker
Date:
Subject: Re: PL/Perl Returned Array