Re: Anyone want to fix plperl for null array elements?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Anyone want to fix plperl for null array elements?
Date: 2005-11-18 03:20:06
Message-ID: 20051118032005.GA69957@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 17, 2005 at 08:41:51PM -0500, Tom Lane wrote:
> I think plperl should be fixed to translate undef to NULL when returning
> an array, but currently it translates to an empty string:

I'll take a look at this if nobody else steps up. It might just
be a minor change to this part of plperl.c:

210 " else " \
211 " { " \
212 " my $str = qq($elem); " \
213 " $str =~ s/([\"\\\\])/\\\\$1/g; " \
214 " $res .= qq(\"$str\"); " \
215 " } " \

> There might be some problems going in the other direction, too;
> I haven't tried. Anybody feeling eager to fix this?

Does the current implementation provide automatic conversion to a
Perl array for inbound values? Unless I'm missing something that
entire problem might still need to be solved.

--
Michael Fuhr

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-18 03:37:31 Re: Anyone want to fix plperl for null array elements?
Previous Message Bruce Momjian 2005-11-18 03:11:33 Re: MERGE vs REPLACE