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

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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
Cc: Alexey Klyukin <alexk(at)commandprompt(dot)com>, 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-03 18:24:47
Message-ID: 1296757487.6442.2.camel@vanquo.pezone.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On tor, 2011-02-03 at 18:01 +0000, Tim Bunce wrote:
> Imagine that PL/Perl could handle named arguments:
> 
>     CREATE FUNCTION join_list( separator text, list array ) AS $$
>         return join( $separator, @$list );
>     $$ LANGUAGE plperl;
> 
> The $list variable, magically created by PL/Perl, could be the array
> reference created by your code, without altering the contents of @_.

I would find that pretty surprising, since Perl itself doesn't even
provide named arguments.


In response to

pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2011-02-03 18:27:01
Subject: Re: ALTER EXTENSION UPGRADE, v3
Previous:From: Dimitri FontaineDate: 2011-02-03 18:21:34
Subject: Re: ALTER EXTENSION UPGRADE, v3

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