Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5B1B19FBA55; Mon, 18 Jun 2007 10:19:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 47492-06; Mon, 18 Jun 2007 10:19:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by postgresql.org (Postfix) with ESMTP id 1EBB79FBA37; Mon, 18 Jun 2007 10:19:03 -0300 (ADT) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis), id 0MKxQS-1I0H8H0Vv8-0008Ci; Mon, 18 Jun 2007 15:19:01 +0200 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1I0H8G-0006RL-00; Mon, 18 Jun 2007 15:19:00 +0200 Date: Mon, 18 Jun 2007 15:19:00 +0200 From: "A. Kretschmer" To: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Exec a text variable as select Message-ID: <20070618131900.GH11387@a-kretschmer.de> References: <46768538.9070909@terra.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46768538.9070909@terra.com.br> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! User-Agent: Mutt/1.5.9i X-Provags-ID: V01U2FsdGVkX18MFgjEqthrJkUYFERcAZkAnW0ZH4FUcR+aL40 06Yu3FXsJ0dO5fgIC7/u487Yb4EqhBQUEEHZWuz9+whvGQRrgZ 2fEIw0zfExt4sWQmypGH/0z2k0rotoU X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/1038 X-Sequence-Number: 115861 am Mon, dem 18.06.2007, um 10:14:32 -0300 mailte Ranieri Mazili folgendes: > Hello, > > I'm creating a function that will create a select statement into a > while, this select will be stored into a text variable, after while ends > I need to execute this query stored into variable, on SQLSERVER I can do: > EXEC(text_variable) > How can I do this on Postgres? With EXECUTE. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net