Convert Postgres arrays to Perl arrays on PL/perl input arguments
Alvaro Herrera <alvherre@alvh.no-ip.org>
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.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/plperl.sgml | modified | +69 −1 |
| src/pl/plperl/expected/plperl_array.out | added | +222 −0 |
| src/pl/plperl/expected/plperl.out | modified | +80 −38 |
| src/pl/plperl/expected/plperl_trigger.out | modified | +71 −61 |
| src/pl/plperl/expected/plperl_util.out | modified | +18 −0 |
| src/pl/plperl/GNUmakefile | modified | +1 −1 |
| src/pl/plperl/plc_perlboot.pl | modified | +58 −30 |
| src/pl/plperl/plperl.c | modified | +502 −188 |
| src/pl/plperl/plperl.h | modified | +1 −0 |
| src/pl/plperl/sql/plperl_array.sql | added | +164 −0 |
| src/pl/plperl/sql/plperl.sql | modified | +36 −11 |
| src/pl/plperl/sql/plperl_trigger.sql | modified | +48 −38 |
| src/pl/plperl/sql/plperl_util.sql | modified | +12 −0 |
| src/pl/plperl/Util.xs | modified | +14 −0 |