Re: libpq Prepared Statement with dynamic IN operator

2020-11-24 Thread Dave Greeko
char* const*)input,NULL ,NULL,0); Dave. On Tuesday, November 24, 2020, 04:13:06 PM PST, David G. Johnston wrote: The convention here is to inline or bottom-post, not top-post. On Tue, Nov 24, 2020 at 3:47 PM Dave Greeko wrote: I would really like to just pass an array of

Re: libpq Prepared Statement with dynamic IN operator

2020-11-24 Thread Dave Greeko
low generate an erro: res=PQexecPrepared(conn,"codecs",2,(const char* const*)input,NULL ,NULL,0); //PQexecPrepared() generates Error: ERROR: bind message supplies 2 parameters, but prepared statement "codecs" requires 1 On Tuesday, November 24, 2020, 01:18:15 PM PST, Tom La

Re: libpq Prepared Statement with dynamic IN operator

2020-11-24 Thread Dave Greeko
are(conn,"codecs",query,1,NULL); Dave, On Tuesday, November 24, 2020, 11:28:07 AM PST, David G. Johnston wrote: On Tue, Nov 24, 2020 at 12:14 PM Dave Greeko wrote: Dear All, I am having a hard time figuring out how prepare and execute a Prepared Statement with an "IN&q

libpq Prepared Statement with dynamic IN operator

2020-11-24 Thread Dave Greeko
Dear All, I am having a hard time figuring out how prepare and execute a Prepared Statement with an "IN" operator in the WHERE clause using libpq. The total elements that will be passed to IN operator is dynamic and varied at runtime. here is an example query: select payload_id,ptime,frequency