[
https://issues.jboss.org/browse/TEIIDDES-1211?page=com.atlassian.jira.plu...
]
Barry LaFond resolved TEIIDDES-1211.
------------------------------------
Resolution: Done
Added validation rule to check sibling name uniqueness across model object types (TABLE,
VIEW, PROCEDURE, INDEX)
Exporting DDL for Postgres produces invalid CREATE INDEX statement
because duplicate object names in database
-------------------------------------------------------------------------------------------------------------
Key: TEIIDDES-1211
URL:
https://issues.jboss.org/browse/TEIIDDES-1211
Project: Teiid Designer
Issue Type: Bug
Components: Import/Export
Affects Versions: 7.4.2
Reporter: Van Halbert
Assignee: Barry LaFond
Fix For: 8.2
Attachments: tpc_postgres.ddl
Trying to execute DDL on postgres database produces this error:
Error: ERROR: relation "orders" already exists
SQLState: 42P07
ErrorCode: 0
Error occured in:
CREATE INDEX ORDERS ON ORDERS (O_CUSTKEY)
----
The problem was resolved if I changed ORDERS index name:
CREATE INDEX ORDERS_IDX ON ORDERS (O_CUSTKEY);
----
Here's a statement I found on the Postgres Naming rules:
The names of all objects must be unique within some scope. Every database must have a
unique name; the name of a schema must be unique within the scope of a single database,
the name of a table must be unique within the scope of a single schema, and column names
must be unique within a table. The name of an index must be unique within a database.
I would like to suggest that all index names that are created are appended with
"idx" or something similar. Right now, the first looks to be the name of the
table, and subsequent names have 1,2, etc. appended.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira