Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 039E464FCFA for ; Sat, 16 Aug 2008 00:59:26 -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 24839-01 for ; Sat, 16 Aug 2008 00:58:56 -0300 (ADT) X-Greylist: delayed 00:08:09.344155 by SQLgrey-1.7.6 Received: from tempest.mainecoon.com (tempest.mainecoon.com [69.12.217.123]) by postgresql.org (Postfix) with ESMTP id 7D8DE64FCD8 for ; Sat, 16 Aug 2008 00:58:55 -0300 (ADT) Received: from [10.1.1.2] (fw.boscorama.com [75.101.8.88]) by tempest.mainecoon.com (Postfix) with ESMTPSA id 9ABF46EA09F for ; Fri, 15 Aug 2008 20:47:49 -0700 (PDT) Message-ID: <48A64DE5.4000906@boscorama.com> Date: Fri, 15 Aug 2008 20:47:49 -0700 From: Bosco Rama User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080717 SeaMonkey/1.1.11 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: ecpg 'set' failure using host vars Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/6 X-Sequence-Number: 6781 Hi, I've been using the following set statement just fine under versions prior to 8.3.3: exec sql char *sm; ... sm = "myschema"; // This may not always be constant ... exec sql set search_path to :sm; However, a recent upgrade from 8.2.7 to 8.3.3 (on FC9) caused the 'set' statement to suddenly start throwing the dreaded error: ERROR: syntax error at or near "$1" in line 13256 Running in debug output mode we are seeing the following: [22245]: ecpg_execute line 13256: QUERY: set search_path to $1 with 1 parameter on connection ecpgconn [22245]: ecpg_execute line 13256: using PQexecParams [22245]: free_params line 13256: parameter 1 = myschema [22245]: ecpg_check_PQresult line 13256: Error: ERROR: syntax error at or near "$1" LINE 1: set search_path to $1 ^ When the schema is replaced by a literal it works just fine, thusly: exec sql set search_path to myschema; Did we miss something in the porting between versions? Any help would be greatly appreciated. Bosco.