Re: PLPERL

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Szekely Zsolt-Csaba <csaba(at)rworker(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PLPERL
Date: 2003-05-25 05:37:01
Message-ID: 20030525053701.GA2265@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 21, 2003 at 06:23:39PM +0300, Szekely Zsolt-Csaba wrote:

> I want to implement a stored procedure written in plperl
> which is able to evaluate expressions.
> i would like to do something like :
>
> ...
> my ($a,$b,$c);
> $a=1;
> $b=2;
>
> eval ''$c=$a+$b;'';
> return $c;
> ...
> Is it possible to do expression evaluation in plperl or other language?

Huh... why don't you try standard Perl expression evaluation?

... my ($a, $b);
$a = 1;
$b = 2;
return $a + $b;
...

But maybe the answer is too simple, so this isn't really the question?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Postgres is bloatware by design: it was built to house
PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)

In response to

  • PLPERL at 2003-05-21 15:23:39 from Szekely Zsolt-Csaba

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2003-05-25 05:43:01 Re: pg_connect()
Previous Message Tom Lane 2003-05-25 04:18:25 Re: disk space usage enlarging despite vacuuming