PQexecParams and IN query? - Mailing list pgsql-interfaces

From Andrew McNamara
Subject PQexecParams and IN query?
Date
Msg-id 20070511120332.6F61C5CC4B5@longblack.object-craft.com.au
Whole thread Raw
Responses Re: PQexecParams and IN query?  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-interfaces
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/


pgsql-interfaces by date:

Previous
From: Michael Meskes
Date:
Subject: PQprepare question
Next
From: Gregory Stark
Date:
Subject: Re: PQexecParams and IN query?