[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] Evaluate a variable
From:       Alvaro Herrera <alvherre () commandprompt ! com>
Date:       2007-01-26 14:19:11
Message-ID: 20070126141911.GD13036 () alvh ! no-ip ! org
[Download RAW message or body]

Luís Sousa wrote:
> Hi,
> 
> Is there anyway to evaluate a variable in plpgsql, like eval on PHP?
> Suppose the example:
> 
> my_var:=''some value!'';
> a:=''my_var'';
> b:=<eval!!> a;
> 
> I already tried b:=EXECUTE a; without luck!

Maybe stashing a SELECT in front?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic