Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 75CEF9FB445 for ; Wed, 13 Jun 2007 09:52:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 45435-10 for ; Wed, 13 Jun 2007 09:52:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gauss.credativ.com (ipx11302.ipxserver.de [212.112.227.254]) by postgresql.org (Postfix) with ESMTP id 2908B9FB5EA for ; Wed, 13 Jun 2007 09:52:44 -0300 (ADT) Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id F01D1D782D for ; Wed, 13 Jun 2007 14:52:41 +0200 (CEST) Received: from feivel (exit.credativ.com [87.139.82.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gauss.credativ.com (Postfix) with ESMTP id CD21BD782A for ; Wed, 13 Jun 2007 14:52:41 +0200 (CEST) Received: by feivel (Postfix, from userid 1000) id 0C751D6CD3; Wed, 13 Jun 2007 14:52:40 +0200 (CEST) Date: Wed, 13 Jun 2007 14:52:41 +0200 From: Michael Meskes To: PostgreSQL Interfaces Subject: execute immediate Message-ID: <20070613125241.GA27209@feivel.credativ.de> Mail-Followup-To: PostgreSQL Interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/11 X-Sequence-Number: 6580 According to the standard EXEC SQL EXECUTE IMMEDIATE dynamically prepares and executes a statement. ECPG used to just simulate this by simply executing the statement. But before rewriting this I wonder if it makes any sense at all. Where's the advantage of preparing a statement, then executing it and then of course deallocating it again over a simple execution? The EXEC SQL EXECUTE IMMEDIATE clause is needed to be able to dynamically compute the statement to be executed, but do we really need to prepare it? Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!