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.