Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 187DF9FB1E7 for ; Fri, 26 Jan 2007 10:19:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 86942-06 for ; Fri, 26 Jan 2007 10:19:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id CC1FC9FA433 for ; Fri, 26 Jan 2007 10:19:23 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-100-202.bk7-dsl.surnet.cl [200.126.100.202]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l0QEJDsd024394; Fri, 26 Jan 2007 06:19:14 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id B747B32A0C; Fri, 26 Jan 2007 11:19:11 -0300 (CLST) Date: Fri, 26 Jan 2007 11:19:11 -0300 From: Alvaro Herrera To: =?iso-8859-1?Q?Lu=EDs?= Sousa Cc: pgsql-sql Subject: Re: Evaluate a variable Message-ID: <20070126141911.GD13036@alvh.no-ip.org> Mail-Followup-To: =?iso-8859-1?Q?Lu=EDs?= Sousa , pgsql-sql References: <45B9ECE0.5090007@ualg.pt> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <45B9ECE0.5090007@ualg.pt> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Fri, 26 Jan 2007 06:19:23 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/139 X-Sequence-Number: 27291 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:= 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.