OSDN Git Service

Convert Postgres arrays to Perl arrays on PL/perl input arguments
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 18 Feb 2011 01:11:50 +0000 (22:11 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 18 Feb 2011 01:20:40 +0000 (22:20 -0300)
commit87bb2ade2ce646083f39d5ab3e3307490211ad04
treead32fd5d829a65f06caca164bfc264cbee1e78f0
parentf7b51d175a02a3b6589f091ca732959618844232
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.
14 files changed:
doc/src/sgml/plperl.sgml
src/pl/plperl/GNUmakefile
src/pl/plperl/Util.xs
src/pl/plperl/expected/plperl.out
src/pl/plperl/expected/plperl_array.out [new file with mode: 0644]
src/pl/plperl/expected/plperl_trigger.out
src/pl/plperl/expected/plperl_util.out
src/pl/plperl/plc_perlboot.pl
src/pl/plperl/plperl.c
src/pl/plperl/plperl.h
src/pl/plperl/sql/plperl.sql
src/pl/plperl/sql/plperl_array.sql [new file with mode: 0644]
src/pl/plperl/sql/plperl_trigger.sql
src/pl/plperl/sql/plperl_util.sql