pgsql: Convert Postgres arrays to Perl arrays on PL/perl input argument

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Convert Postgres arrays to Perl arrays on PL/perl input argument
Date: 2011-02-18 01:23:03
Message-ID: E1PqF3n-0003wb-9s@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Convert Postgres arrays to Perl arrays on PL/perl input arguments

More generally, arrays are turned in Perl array references, and row and
composite types are turned into Perl hash references. This is done
recursively, in a way that's natural to every Perl programmer.

To avoid a backwards compatibility hit, the string representation of
each structure is also available if the function requests it.

Authors: Alexey Klyukin and Alex Hunsaker.
Some code cleanups by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/87bb2ade2ce646083f39d5ab3e3307490211ad04

Modified Files
--------------
doc/src/sgml/plperl.sgml | 70 +++-
src/pl/plperl/GNUmakefile | 2 +-
src/pl/plperl/Util.xs | 14 +
src/pl/plperl/expected/plperl.out | 118 ++++--
src/pl/plperl/expected/plperl_array.out | 222 +++++++++
src/pl/plperl/expected/plperl_trigger.out | 132 +++---
src/pl/plperl/expected/plperl_util.out | 18 +
src/pl/plperl/plc_perlboot.pl | 88 +++--
src/pl/plperl/plperl.c | 690 +++++++++++++++++++++--------
src/pl/plperl/plperl.h | 1 +
src/pl/plperl/sql/plperl.sql | 47 ++-
src/pl/plperl/sql/plperl_array.sql | 164 +++++++
src/pl/plperl/sql/plperl_trigger.sql | 86 ++--
src/pl/plperl/sql/plperl_util.sql | 12 +
14 files changed, 1296 insertions(+), 368 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2011-02-18 02:44:08 Re: [COMMITTERS] pgsql: Hot Standby feedback for avoidance of cleanup conflicts on stand
Previous Message Tom Lane 2011-02-18 00:01:15 pgsql: Fix tsmatchsel() to account properly for null rows.