Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2F7F56502D6 for ; Mon, 18 Aug 2008 11:59:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15861-06 for ; Mon, 18 Aug 2008 11:58:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gauss.credativ.com (gauss.credativ.com [212.112.227.254]) by postgresql.org (Postfix) with ESMTP id 5FF61650285 for ; Mon, 18 Aug 2008 11:58:28 -0300 (ADT) Received: from feivel (exit.credativ.com [87.139.82.80]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gauss.credativ.com (Postfix) with ESMTP id 9D4AD77579; Mon, 18 Aug 2008 16:58:12 +0200 (CEST) Received: by feivel (Postfix, from userid 1000) id 725ABD6D36; Mon, 18 Aug 2008 16:58:21 +0200 (CEST) Date: Mon, 18 Aug 2008 16:58:21 +0200 From: Michael Meskes To: Bosco Rama Cc: pgsql-interfaces@postgresql.org Subject: Re: ecpg 'set' failure using host vars Message-ID: <20080818145821.GA5062@feivel.credativ.de> Mail-Followup-To: Bosco Rama , pgsql-interfaces@postgresql.org References: <48A64DE5.4000906@boscorama.com> <20080816083156.GA26567@feivel.credativ.de> <14940.1218902460@sss.pgh.pa.us> <48A70C6A.6080107@boscorama.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48A70C6A.6080107@boscorama.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/11 X-Sequence-Number: 6786 >>> Without checking the sources it seems as if PQexecParams is not able > > to handle a parameter in a set command. Can anyone confirm this? >> >> The backend only supports parameters in plannable statements, ie >> SELECT/INSERT/UPDATE/DELETE. (Possibly DECLARE CURSOR, I'm too >> lazy to check.) > > Thanks for the hint guys. I used a prepare/execute pair instead and > it worked a treat. More cumbersome but it gets the job done. I will fix this as soon as my time permits. There is logic there in ecpg to handle parameters on the client side. 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 VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!