[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910870#action_12910870 ]
Tony Rippy commented on DDLUTILS-205: ------------------------------------- I'll take a shot at this. > Upper case indexed column name causes Exception on readModelFromDatabase call > ----------------------------------------------------------------------------- > > Key: DDLUTILS-205 > URL: https://issues.apache.org/jira/browse/DDLUTILS-205 > Project: DdlUtils > Issue Type: Bug > Components: Core - PostgreSql > Affects Versions: 1.0 > Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: > Windows XP Pro, DdlUtils: 1.0 > Reporter: Andrew S. > Assignee: Thomas Dudziak > Priority: Blocker > Original Estimate: 4h > Remaining Estimate: 4h > > Consider the following example: > ---- > CREATE TABLE product ( > product_class_id integer NOT NULL, > product_id integer NOT NULL, > brand_name character varying(60), > product_name character varying(60) NOT NULL, > "SKU" bigint NOT NULL, > "SRP" numeric(10,4), > gross_weight real, > net_weight real, > recyclable_package boolean, > low_fat boolean, > units_per_case smallint, > cases_per_pallet smallint, > shelf_width real, > shelf_height real, > shelf_depth real > ); > CREATE INDEX "i_product_SKU" ON product USING btree ("SKU"); > --- > When such DB gets read by calling readModelFromDatabase(.), the following > exception happens: > org.apache.ddlutils.model.ModelException: The index i_product_SKU in table > product references the undefined column "SKU" > at org.apache.ddlutils.model.Database.initialize(Database.java:393) > at > org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484) > at > org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920) > at DdlUtilsExample.main(DdlUtilsExample.java:66) > While table gets the column name as [SKU], index gets it as ["SKU"]. On > checkup in Database.initialize(), indexed column cannot be found by name > under given table, and Exception gets thrown. > It looks like a postgresql bug in JDBC driver that needs a special care in > this project. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.