Kevin Grittner wrote:
> Ah, that may be a good clue.
>
> We are not selecting any columns which are not directly mappable
> to a Java type -- at least not intentionally. There is a problem with
> a JDBC escape sequence which is not implemented by PostgreSQL
> which is throwing some exceptions, which we are still cleaning up.
> Perhaps the syntax is occassionally being interpreted in some way
> which is causing this. I'll suspend this issue until we get the other
> cleaned up and see if we still have this problem.
What escape sequence is that? We could look at implementing it.
> This is happening on a SELECT where the result set consists entirely
> of simple references to columns from a single table. The columns are
> all char, varchar, numeric, or int -- so they should all map to Java
> types. It is happening on a small percentage of SELECTs with no
> apparent difference beyond the values used in otherwise identical
> WHERE clauses.
>
I see no reason why the WHERE clause would alter the type of a result
column. Checking:
Object o = rs.getObject(col);
if (o instanceof PGobject) {
System.err.println(((PGobject)o).getType());
System.err.println(((PGobject)o).getValue());
}
or similar would tell you what the returned type was.
Kris Jurka