Skip site navigation (1) Skip section navigation (2)

Re: JDBC bug?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC bug?
Date: 2001-11-26 20:42:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
> 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                        |
  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

pgsql-jdbc by date

Next:From: Barry LindDate: 2001-11-26 20:52:29
Subject: Re: JDBC bug?
Previous:From: Colin FreasDate: 2001-11-26 20:41:28
Subject: Re: JDBC bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group