Re: eval in plpgsl - Mailing list pgsql-general

From Jan Wieck
Subject Re: eval in plpgsl
Date
Msg-id 40756174.4090102@Yahoo.com
Whole thread Raw
In response to Re: eval in plpgsl  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Bruce Momjian wrote:

> 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
>

It does not. This really isn't a full blown scripting language. If one
wants that, there is PL/Tcl.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-general by date:

Previous
From: Sky
Date:
Subject: Oid problem
Next
From: Richard Huxton
Date:
Subject: Re: Oid problem