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

JDBC driver DatabaseMetaData.getTables() unconditionally lowercases tableName pattern

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: JDBC driver DatabaseMetaData.getTables() unconditionally lowercases tableName pattern
Date: 2000-11-13 20:37:50
Message-ID: 200011132037.eADKboY34552@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Dave Barnett (dave(at)lions(dot)med(dot)jhu(dot)edu) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
JDBC driver DatabaseMetaData.getTables() unconditionally lowercases tableName pattern

Long Description
According to Chapter 2 of the User's Guide, NAMES may be quoted to preserve case.  In the JDBC driver found in Postgres 7.0.2, jdbc2/DatabaseMetaData.java repeatedly converts the name pattern automatically to lowercase.  Removing these improper conversions provides usable behavior.

I think the driver shouldn't be doing anything to the pattern, so that the user may handle case conversions as needed.  Alternatively, the driver should simply not be doing this in the case that it is quoted.

Current workarounds:
1. modify driver code and recompile driver
2. provide a '%' tableName pattern and sift through all the tables in user code checking for proper matches

-Dave Barnett

Sample Code


No file was uploaded with this report


pgsql-bugs by date

Next:From: thilDate: 2000-11-13 21:42:46
Subject: libpq dependencies in redhat binary rpm
Previous:From: Tom LaneDate: 2000-11-13 15:37:41
Subject: Re: Security problem in psql frontends

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