On Wed, 18 Jul 2007, Ingmar Lötzsch wrote:
> SELECT *
> FROM table1
> WHERE id IN (1, 2, 3);
>
> whereas the list 1, 2, 3 must be created dynamically. The goal is to
> avoid n queries for single objects instead of one query. I can
> concatenate the statement and use Statement. But I can't figure out, how
> to use PreperedStatement. Can you help me?
>
This identical thread concluded with a perl example that is relevant.
http://archives.postgresql.org/pgsql-jdbc/2007-06/msg00015.php
Kris Jurka