Re: PLPERL

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: PLPERL
Дата
Msg-id 20030525053701.GA2265@dcc.uchile.cl
обсуждение исходный текст
Ответ на PLPERL  ("Szekely Zsolt-Csaba" <csaba@rworker.com>)
Список 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)

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: disk space usage enlarging despite vacuuming
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_connect()