Re: arrays as pl/perl input arguments [PATCH]

Alexey Klyukin <alexk@commandprompt.com>

From: Alexey Klyukin <alexk@commandprompt.com>
To: Alex Hunsaker <badalex@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, "David E. Wheeler" <david@kineticode.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-02-15T14:39:07Z
Lists: pgsql-hackers

Attachments

On Feb 12, 2011, at 9:53 AM, Alex Hunsaker wrote:

> On Fri, Feb 11, 2011 at 17:17, Alexey Klyukin <alexk@commandprompt.com> wrote:
> 
> Anyway in playing with this patch a bit more I found another bug
> return [[]]; would segfault.
> 
> So find attached a v9 that:
> - fixes above segfault
> 
> - made plperl_sv_to_literal vastly simpler (no longer uses SPI and
> calls regtypin directly)
> 
> - removed extraneous </para> added in v8 in plperl.sgml (my docbook
> stuff is broken, so I can't build them, hopefully there are no other
> problems)
> 
> - we now on the fly (when its requested) make the backwards compatible
> string for arrays (it was a few lines now that we have
> plperl_sv_to_literal)
> 
> - make plperl.o depend on plperl_helpers.h (should have been done in
> the utf8 patch)
> 
> Anyway barring any more bugs, I think this patch is ready.
> <pg_to_perl_arrays_v9.patch.gz>

Thank you for finding and fixing the bugs there. I think removing the para was a mistake.
I specifically added it to fix the problem I had when building the docs:

openjade:plperl.sgml:353:8:E: end tag for "PARA" omitted, but OMITTAG NO was specified
openjade:plperl.sgml:201:2: start tag was here

After I re-added the closing </para> in plperl.sgml:235 these errors disappeared, and the
resulting html looks fine too. v10 with just this single change is attached.


/A


--
Alexey Klyukin
The PostgreSQL Company - Command Prompt, Inc.