Re: [GENERAL] PQexecParams question

2008-10-13 Thread Gregory Stark
Grzegorz Jaśkiewicz [EMAIL PROTECTED] writes: that would be a type mismatch, heh. prepare select * from foo where a = any($1::int[]) then pass {1,2,3} -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's

Re: [GENERAL] PQexecParams question

2008-10-12 Thread Grzegorz Jaśkiewicz
I don't see that working using arrays here. Can you elaborate please ?

Re: [GENERAL] PQexecParams question

2008-10-12 Thread Pavel Stehule
Hello 2008/10/12 Grzegorz Jaśkiewicz [EMAIL PROTECTED]: I don't see that working using arrays here. Can you elaborate please ? select * from foo where a = any ($1) postgres=# select 1 = any(array[1,2,3]); ?column? -- t (1 row) regards Pavel Stehule -- Sent via pgsql-general

Re: [GENERAL] PQexecParams question

2008-10-12 Thread Grzegorz Jaśkiewicz
that would be a type mismatch, heh.

[GENERAL] PQexecParams question

2008-10-11 Thread Grzegorz Jaśkiewicz
Hey folks, I have here piece of code, that I wrote some time ago - works fine, but I was wondering - if it can be improved. This is used to grab id list, not present on submited list. Query usually looks like that; select id from foo where id not in ($1, $2, $3...); and I was wondering, is it

Re: [GENERAL] PQexecParams question

2008-10-11 Thread Pavel Stehule
2008/10/11 Grzegorz Jaśkiewicz [EMAIL PROTECTED]: Hey folks, I have here piece of code, that I wrote some time ago - works fine, but I was wondering - if it can be improved. This is used to grab id list, not present on submited list. Query usually looks like that; select id from foo where id