pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Evaluate a variable
2+ messages / 2 participants
[nested] [flat]

* Evaluate a variable
@ 2007-01-26 11:58 Luís Sousa <llsousa@ualg.pt>
  2007-01-26 14:19 ` Re: Evaluate a variable Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Luís Sousa @ 2007-01-26 11:58 UTC (permalink / raw)
  To: pgsql-sql

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!

Best regards,
Luís Sousa




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Evaluate a variable
  2007-01-26 11:58 Evaluate a variable Luís Sousa <llsousa@ualg.pt>
@ 2007-01-26 14:19 ` Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2007-01-26 14:19 UTC (permalink / raw)
  To: Luís Sousa <llsousa@ualg.pt>; +Cc: pgsql-sql

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-01-26 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-26 11:58 Evaluate a variable Luís Sousa <llsousa@ualg.pt>
2007-01-26 14:19 ` Alvaro Herrera <alvherre@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox