Re: Evaluate a variable

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Luís Sousa <llsousa(at)ualg(dot)pt>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Evaluate a variable
Date: 2007-01-26 14:19:11
Message-ID: 20070126141911.GD13036@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rob V 2007-01-26 14:44:43 Re: LEFT Join Question
Previous Message Andrew Sullivan 2007-01-26 12:58:35 Re: LEFT Join Question