From: Alvaro Herrera <alvherre@commandprompt.com>
To: Luís Sousa <llsousa@ualg.pt>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Evaluate a variable
Date: Fri, 26 Jan 2007 11:19:11 -0300
Message-ID: <20070126141911.GD13036@alvh.no-ip.org> (raw)
In-Reply-To: <45B9ECE0.5090007@ualg.pt>
References: <45B9ECE0.5090007@ualg.pt>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: alvherre@commandprompt.com, llsousa@ualg.pt
Subject: Re: Evaluate a variable
In-Reply-To: <20070126141911.GD13036@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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