Re: JDBC bug? - Mailing list pgsql-jdbc

From Colin Freas
Subject Re: JDBC bug?
Date
Msg-id IIEPJDIJEEBPKJGDFFBEAEDMCAAA.cef6@georgetown.edu
Whole thread Raw
In response to Re: JDBC bug?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: JDBC bug?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: JDBC bug?  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-jdbc
> via quoted mixed case identifiers.  I haven't seen any evidence that
> basic SQL operations (select, insert, update, delete) have a bug in them.

I'd peg a where clause as a basic SQL operation, and be it bug, feature,
annoyance, whatever, it wasn't functioning because of the case of a column
name.

This worked:
1.  rs = stmt.executeQuery("select * from response");

But I wanted to do this, which didn't work:
2.  rs = stmt.executeQuery("select * from response where questionID=16");

This is how I got it to work:
3.  rs = stmt.executeQuery("SELECT \"response\".\"questionID\",
\"response\".\"respondentID\", \"response\".\"answer\", \"response\".\"ID\"
FROM \"response\" WHERE "\response\".\"questionID\"=16");

Sorry, does anyone think the third is better than the second?


pgsql-jdbc by date:

Previous
From: Stuart Robinson
Date:
Subject: Re: CallableStatements
Next
From: Barry Lind
Date:
Subject: Re: JDBC bug?