Re: arrays as pl/perl input arguments [PATCH] - Mailing list pgsql-hackers

From Tim Bunce
Subject Re: arrays as pl/perl input arguments [PATCH]
Date
Msg-id 20110202171600.GA719@timac.local
Whole thread Raw
In response to arrays as pl/perl input arguments [PATCH]  (Alexey Klyukin <alexk@commandprompt.com>)
Responses Re: arrays as pl/perl input arguments [PATCH]  (Alexey Klyukin <alexk@commandprompt.com>)
List pgsql-hackers
I'm sorry I'm late to this party. I haven't been keeping up with pgsql-hackers.

I'd kind'a hoped that this functionality could be tied into extending
PL/Perl to handle named arguments. That way the perl variables
corresponding to the named arguments could be given references without
breaking any code.

Some observations on the current code (based on a quick skim):

- I'd like to see the conversion function exposed as a builtin   $ref = decode_array_literal("{...}");

- Every existing plperl function that takes arrays is going to get slower due to the overhead of parsing the string and
allocatingthe array and all its elements.
 

- Some of those functions may not use the array at all and some may simply pass it on as an argument to another
function.

- Making the conversion lazy would be a big help.

Tim.


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Optimize PL/Perl function argument passing [PATCH]
Next
From: Dimitri Fontaine
Date:
Subject: Re: ALTER EXTENSION UPGRADE, v3