Received: from georgetown.edu (postoffice.georgetown.edu [141.161.1.110]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAQJBMm21681 for ; Mon, 26 Nov 2001 14:11:22 -0500 (EST) (envelope-from cef6@georgetown.edu) Received: from mailhost.georgetown.edu (mailhost.georgetown.edu [141.161.1.103]) by georgetown.edu (8.11.1/8.11.1) with ESMTP id fAQJAuL12745; Mon, 26 Nov 2001 14:11:20 -0500 (EST) Received: from andrew ([141.161.80.35]) (authenticated as cef6 with LOGIN (0 bits)) by mailhost.georgetown.edu (8.11.1/8.11.1) with ESMTP id fAQJAtb05770 (using TLSv1/SSLv3 with cipher RC4-MD5 (128 bits) verified NO); Mon, 26 Nov 2001 14:10:56 -0500 (EST) From: "Colin Freas" To: "Bruce Momjian" , "Nate Gelbard" Cc: Subject: Re: JDBC bug? Date: Mon, 26 Nov 2001 14:10:52 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <200111261830.fAQIUOH29986@candle.pha.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Archive-Number: 200111/267 X-Sequence-Number: 2464 >> Hi, >> >> I've found an annoyance with the postgresql JDBC driver (from the 7.1.3 >> release). >> >> Pardon if this has been asked before, but the web archives are offline... >> >> In org/postgresql/jdbc2/DatabaseMetaData.java, there are several lines >> that call toLowerCase() on the table string names. This causes 'table >> unknown' erros when accessing tables with mixed case in the name. This >> popped out at me when trying to use the XML-DBMS package and also >> DbVisualizer. >> >> So does postgres not support mixed case in table names, or the backend >> does but the clients dont, or what? > >Well, we support mixed case identifiers, but they need to be >double-quoted, as you saw. The \d behavior looks correct. The jdbc >issue looks more complicated because we are forcing lowercase in the >jdbc code. Perhaps some jdbc folks can comment on that. I think Nate's being kind calling this an annoyance. I may have missed something in the docs, but I just spent a few frustrating hours confronting a similar issue with tables of mixed case. Everything was working correctly with my servlet, except when I referenced a column with a name like questionID in a where clause. Note the casing. I had no idea this is what was wrong until, other ideas exhausted, I recreated my query text with pgadmin's query wizard and it put quotes around everything in the SQL it generated. Is there a pqsql-jdbc log somewhere that this might have shown up? I was so sure it was my java code (which in the end it was, sort of :) I never bothered to check any Postgres logs. Would it have shown up somewhere there? Either way, personally, I think this isn't the best behavior. I don't want to get into a casing flame war, but, I would've expected an exception if it couldn't figure out what was happening with the where clause, something at least. Colin Freas