Re: Arrays of Records in PL/Perl - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Re: Arrays of Records in PL/Perl
Date
Msg-id CAFaPBrSAvxpk=kU8pPcznJdTr-+959MWG+o95gHaM6vLytD-Qw@mail.gmail.com
Whole thread Raw
In response to Arrays of Records in PL/Perl  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Arrays of Records in PL/Perl
List pgsql-hackers
On Tue, Jul 12, 2011 at 12:45, David E. Wheeler <david@kineticode.com> wrote:
> Hackers,

> That is, if a record is passed to a PL/Perl function, it's correctly converted into a hash. If, however, an array of
recordsare passed, the record are stringified, rather than turned into hashes. This seems inconsistent. Bug?
 

All Arrays in 9.0 and lower are strings, regardless of if they are
comprised of composite types. Its not so much a bug as a limitation.
Alexey Klyukin fixed this for 9.1 :-)

[ In 9.1 we could not make them straight perl arrayrefs as we needed
to keep the string representation for backwards compatibility. What we
did in 9.1 is overload the arrayref and string operations on blessed
object so you can treat it as either. ]


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Full GUID support
Next
From: Jeff Davis
Date:
Subject: Re: reducing the overhead of frequent table locks, v4