Re: eval in plpgsl - Mailing list pgsql-general

From Bruce Momjian
Subject Re: eval in plpgsl
Date
Msg-id 200404080314.i383EID28920@candle.pha.pa.us
Whole thread Raw
In response to eval in plpgsl  (Mage <mage@mage.hu>)
Responses Re: eval in plpgsl
Re: eval in plpgsl
List 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Mage
Date:
Subject: eval in plpgsl
Next
From: Shanmugasundaram Doraisamy
Date:
Subject: Problem with pg_dump - reg.