db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: DBMD.getTables() not handling quoted table names correctly?
Date Thu, 02 Aug 2007 13:29:58 GMT
David Van Couvering wrote:
> HI, all
> 
> I am testing quoting identifiers in NB, and I am using
> DatabaseMetaData to see if a table exists.
> 
> I create a table called test.  In SquirrelSQL I see that it is called
> TEST because Derby auto-upper-cased it, as expected.
> 
> Then I run DatabaesMetaData.getTables(null, null, "test", null);
> 
> and it returns no rows.
> 
> If create a table, *with quotes*, called 'quotedTable'.
> 
> and then call DatabaseMetadata.getTables(null, null, "quotedTable", null);
> 
> this returns a row, with the table name as 'quotedTable'.
> 
> Shouldn't DBMD auto-upper-case the identifier just like regular SQL?

No. See the javadoc for DMD.getTables():

  "tableNamePattern - a table name pattern; must match the table name as 
it is stored in the database"

Dan.

Mime
View raw message