Re: JDBC bug?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Colin Freas <cef6(at)georgetown(dot)edu>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC bug?
Date: 2001-11-26 20:53:56
Message-ID: 200111262053.fAQKruV18936@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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");

Only this should have worked:

rs = stmt.executeQuery("select * from response where \"questionID\"=16");

The expansion of the "*" should protect any mixed case items by default.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2001-11-26 21:01:37 insert/update/delete statements returning a query response
Previous Message Barry Lind 2001-11-26 20:52:29 Re: JDBC bug?