pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Barry Lind <barry@xythos.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC bug?
Date: Mon, 26 Nov 2001 15:42:27 -0500 (EST)
Message-ID: <200111262042.fAQKgRd18087@candle.pha.pa.us> (raw)
In-Reply-To: <3C02A763.4030300@xythos.com>

> Correct.  But if you ask the API to get information about table myTable, 
> you should get an answer back for a table created as (create table 
> myTable (foo text)).  The only way to do this is to lowercase the input 
> to match what the database is storing (mytable in this case).  I agree 
> that if the table is created with a mixed case identifier (create table 
> "myTable" (foo text)) then there isn't a need to lower case in the 
> driver.  Therefore the fact that there are a bunch of calls to 
> toLowerCase() in the jdbc code for DatabaseMetaData doesn't mean that 
> there is a bug here as they are entirely appropriate under some 
> circumstances.  If someone produces a test case that demonstrates a bug 
> I will be glad to look into it.  But up to this point there has only 
> been a lot of speculation on code that may be entirely correct.  Test 
> cases demonstrating a real problem would be much apprecieated in this case.
> 

OK, I see what you mean.  If you pass in myTable, you want to look for
mytable in pg_class.  However, what if they pass in "myTable", with the
quotes?  Do we skip the lowercase step?

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



view thread (23+ messages)  latest in thread

Message-ID: <200111262042.fAQKgRd18087@candle.pha.pa.us>
Permalink:  ../200111262042.fAQKgRd18087@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200111262042.fAQKgRd18087@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pgman@candle.pha.pa.us, barry@xythos.com
  Subject: Re: JDBC bug?
  In-Reply-To: <200111262042.fAQKgRd18087@candle.pha.pa.us>
  References: <3C02A763.4030300@xythos.com> <200111262042.fAQKgRd18087@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox