Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: jdbc-db2 plugin
-
Labels:None
Description
Omitting a table schema name does not work because of
DB2SpatialCatalog.loadCatalog
builds an SQL Statement
String queryGeom = "SELECT table_schema, table_name, column_name, "
+ " type_name, srs_id" + " FROM db2gse.st_geometry_columns"
+ " WHERE table_schema = '" + schemaName + "' ";
If no Name is given the where Condition resolves to "where table_schema='null'". I think using the userid would fix this.
The next problem is using lower case letters in the schema name because DB2 stores the names as uppercase. Automatically converting
would resolve this problem.
It is not really appropriate to automatically convert the schema name to uppercase all the time because DB2 supports mixed-case schema names if you specify them in double-quotes for example:
SELECT COUNT(*) FROM "MyMixedSchema"."MyMixedTable"
If you didn't provide the quotes, this would default to MYMIXEDSCHEMA.MYMIXEDTABLE.
This is critical to support non-Western languages in particular.