PREPARE query with IN?

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: PREPARE query with IN?
Date: 2009-08-05 22:34:06
Message-ID: h5d1d0$11l$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it possible to prepare a query with the IN clause in a meaningful
way? I could probably do it with a hard-coded number of arguments, like
"SELECT x FROM t WHERE y IN ($1, $2, $3)" but that kind of misses the
point of using IN for my needs.

In any case, it would probably be a good idea to add a sentence about it
on http://www.postgresql.org/docs/8.3/interactive/sql-prepare.html since
I'm probably not the first one to ask about it :)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christine Desmuke 2009-08-05 23:03:36 Re: Make check fails on 8.3.7
Previous Message Eric Schwarzenbach 2009-08-05 22:14:20 Re: explicit JOIN faster than implicit?