Skip site navigation (1) Skip section navigation (2)

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

From: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
To: Alexey Klyukin <alexk(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: arrays as pl/perl input arguments [PATCH]
Date: 2011-02-02 17:16:00
Message-ID: 20110202171600.GA719@timac.local (view raw or flat)
Thread:
Lists: 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 allocating the
  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.

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-02-02 17:19:08
Subject: Re: [HACKERS] Slow count(*) again...
Previous:From: Andrew DunstanDate: 2011-02-02 17:10:59
Subject: Re: Optimize PL/Perl function argument passing [PATCH]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group