diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2005-11-18 17:00:28 +0000 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2005-11-18 17:00:28 +0000 |
commit | b410475672eaf06ba91a03c50c571bd52fd81a32 (patch) | |
tree | 605a4fb28ce0bad3d4f6ea3e7229e3ca5c4eabff /src/pl/plperl/plperl.c | |
parent | 33e9f2c3d449ee13497f1af63c99edbf02856743 (diff) |
translate undef to NULL for result arrayref, now that we allow NULLs in arrays. Update plperl regression test accordingly.
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 01d7b2453b1..274add609b3 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -33,7 +33,7 @@ * ENHANCEMENTS, OR MODIFICATIONS. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.94 2005/10/18 17:13:14 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.95 2005/11/18 17:00:28 adunstan Exp $ * **********************************************************************/ @@ -207,12 +207,16 @@ plperl_init_all(void) " { " \ " $res .= _plperl_to_pg_array($elem); " \ " } " \ - " else " \ + " elsif (defined($elem)) " \ " { " \ " my $str = qq($elem); " \ " $str =~ s/([\"\\\\])/\\\\$1/g; " \ " $res .= qq(\"$str\"); " \ " } " \ + " else " \ + " { "\ + " $res .= 'NULL' ; " \ + " } "\ " } " \ " return qq({$res}); " \ "} " |