Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id DCA909FBE54 for ; Fri, 11 May 2007 09:21:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 21786-04 for ; Fri, 11 May 2007 09:21:39 -0300 (ADT) X-Greylist: delayed 00:18:05.19146 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id CDE289FBD81 for ; Fri, 11 May 2007 09:21:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from syd.object-craft.com.au (ppp167-236-184.static.internode.on.net [59.167.236.184]) by svr4.postgresql.org (Postfix) with ESMTP id 557775AF074 for ; Fri, 11 May 2007 12:03:37 +0000 (GMT) Received: by longblack.object-craft.com.au (Postfix, from userid 1000) id 6F61C5CC4B5; Fri, 11 May 2007 22:03:31 +1000 (EST) Received: from longblack (localhost [127.0.0.1]) by longblack.object-craft.com.au (Postfix) with ESMTP id 49C62705274 for ; Fri, 11 May 2007 22:03:32 +1000 (EST) To: pgsql-interfaces@postgresql.org Subject: PQexecParams and IN query? Date: Fri, 11 May 2007 22:03:32 +1000 From: Andrew McNamara Message-Id: <20070511120332.6F61C5CC4B5@longblack.object-craft.com.au> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/11 X-Sequence-Number: 6518 I'm trying to use PQexecParams to do an "IN" query, where the set of values is supplied as a single parameter - essentially: SELECT * FROM sometable WHERE colvalue IN $1 With $1 as a set or array of some sort. Unfortunately, the above doesn't pass parsing. Is there any way to do an IN query via PQexecParams that doesn't involve enumerating the set of values as individual parameters? Previously, we were using PQexec(), and the adapter layer was conveniently expanding the set into the command. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/