behavior of getTables() wrt capitalization of type - Mailing list pgsql-jdbc

From brian zimmer
Subject behavior of getTables() wrt capitalization of type
Date
Msg-id 001a01c198da$79dec6a0$6401a8c0@mountain
Whole thread Raw
Responses Re: behavior of getTables() wrt capitalization of type  ("Dave Cramer" <Dave@micro-automation.net>)
List pgsql-jdbc
Hello,

There seems to be a bug in DatabaseMetaData.getTables() with respect to
the capitalization of the values in the 'types' array.  I apologize for
not having the latest source, but I looked at some slightly older source
and found that there is an static final array of types (VIEW, TABLE,
...) and the corresponding sql clause to query it.  When the type values
are capitalized all works fine, but if they are not then the exception
below occurs.  It seems as though each value in the types array should
be capitalized when doing the comparison with the values in the static
final array.

I tried figuring it out dynamically through the various supports*() and
stores*() methods on DMD but only supportsMixedCaseIdentifiers()
returned true and from my testing this does not seem to be the case.  I
did download and test with the latest developer snapshot but the same
bug occurs.

Results from running the enclosed test case:

Attempting type [TABLE]
 table: zxtesting
SUCCESS with type [TABLE]

Attempting type [table]
 ERROR:  parser: parse error at or near ")"
FAILURE with type [table]

thanks,

brian

Attachment

pgsql-jdbc by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: Re: The backend has broken the connection...
Next
From: "Dave Cramer"
Date:
Subject: Re: behavior of getTables() wrt capitalization of type