On Sat, Jul 19, 2003 at 03:03:20AM -0400, Aaron Mulder wrote:
> I have to agree that it would be better to provide a solution
> using API calls than a solutions that requires one to send SQL syntax
> into a ?.
>
> But why can't we kill both birds with an implementation of
> java.sql.Array? If you need to use an Array, you can use a PGArray that
> wraps an Object[]. If you want to do an in clause, do "where foo in (?)"
> or "where foo in ?" and then use ps.setArray() instead of setObject().
> Then we can make the docs explicit on this.
setArray() needs to generate "'{1,2,3}'" for an array field, but you want
"(1,2,3)" for an IN clause. Requiring the JDBC driver to parse the query to
distinguish the two cases seems awkward.
-O