Re: eval in plpgsl

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Mage <mage(at)mage(dot)hu>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: eval in plpgsl
Date: 2004-04-08 03:14:18
Message-ID: 200404080314.i383EID28920@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mage wrote:
> Hello,
>
> is there any variable variable syntax or function in plpgsql? I didn't
> find it.
>
> I mean something like: magic(''new.'' || TG_ARGV[0]) = 5;

Uh, we have EXECUTE, but I don't know if will allow you to set a local
variable. Maybe you can do:

EXECUTE SELECT ''new.''|| TG_ARGV[0] INTO new var

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shanmugasundaram Doraisamy 2004-04-08 06:03:51 Problem with pg_dump - reg.
Previous Message Tom Lane 2004-04-08 01:46:41 Re: Cursors and Transactions, why?