Workaround to get arrays for plperl

From: <Eugen(dot)Konkov(at)aldec(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Workaround to get arrays for plperl
Date: 2008-03-30 13:23:07
Message-ID: 045401c89269$31f6fa30$1200a8c0@kharkov.localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

It seems that function get arrays as strings in plperl.
This is a little workaround who want pass arrays to plperl functions

my( $strarr )= @_;
$strarr =~ s/{/[/g;
$strarr =~ s/}/]/g;
my $arr= eval $strarr;

NOTICE:
you must create you function as plperlu
and add language:
create language plperlu;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message CaT 2008-03-30 13:27:19 Re: Workaround to get arrays for plperl
Previous Message Eduard Fernandez-Diaz 2008-03-30 12:52:05 BUG #4069: Wrong tip