Subject: | SQL::Translator::Producer::Oracle overrides constraint names with table causing errors |
Date: | Mon, 13 Jun 2016 22:06:58 +0000 |
To: | "bug-SQL-Translator [...] rt.cpan.org" <bug-SQL-Translator [...] rt.cpan.org> |
From: | "Baumhauer, Andy" <Andy.Baumhauer [...] interactivedata.com> |
Line 336 of SQL/Translator/Producer/Oracle.pm overrides the $c->name value supplied by the user with the $table_name prepending. Oracle doesn't like constraint identifiers longer than 30 characters. In cases where the user has long table names, and wants to hard-code the constraint identifier, this code is making the problem worse. I've encountered two errors due to this issue, "ORA-01408: such column list already indexed" and ORA-00904: invalid identifier.
A discussion on why this issue exists is here: http://stackoverflow.com/questions/1378133/why-are-oracle-table-column-index-names-limited-to-30-characters
Either we add an option to enable this "helpful" code. Or disable the table prepending and trust that the programmer knows what is best to name the constraint.
*******************************************************
This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.
*******************************************************