Commit Graph

6 Commits

Author SHA1 Message Date
Tom Lane 4172bd8830 Suppress some "variable might be clobbered by longjmp" warnings.
Seen with an older gcc version.  I'm not sure these represent any real
risk factor, but still a bit scary.  Anyway we have lots of other
volatile-marked variables in this code, so a couple more won't hurt.
2011-03-06 21:15:48 -05:00
Alvaro Herrera 87bb2ade2c 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.
2011-02-17 22:20:40 -03:00
Andrew Dunstan 50d89d422f Force strings passed to and from plperl to be in UTF8 encoding.
String are converted to UTF8 on the way into perl and to the
database encoding on the way back. This avoids a number of
observed anomalies, and ensures Perl a consistent view of the
world.

Some minor code cleanups are also accomplished.

Alex Hunsaker, reviewed by Andy Colson.
2011-02-06 17:29:26 -05:00
Peter Eisentraut fc946c39ae Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Andrew Dunstan 05672e5045 Add utility functions to PLPerl:
quote_literal, quote_nullable, quote_ident,
    encode_bytea, decode_bytea, looks_like_number,
    encode_array_literal, encode_array_constructor.
Split SPI.xs into two - SPI.xs now contains only SPI functions. Remainder
are in new Util.xs.
Some more code and documentation cleanup along the way, as well as
adding some CVS markers to files missing them.

Original patch from Tim Bunce, with a little editing from me.
2010-01-20 01:08:21 +00:00