You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by David Van Couvering <da...@vancouvering.com> on 2007/08/01 21:35:18 UTC
DBMD.getTables() not handling quoted table names correctly?
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?
David
Re: DBMD.getTables() not handling quoted table names correctly?
Posted by Daniel John Debrunner <dj...@apache.org>.
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.