Hi!

    Version 0.09001 of the SQL-Translator introduced a new method to create 
unique index names for PostgreSQL (function "next_unused_name" in 
Producer/PostgreSQL.pm). However, there is an issue with this method which I 
would like to discuss. We use SQL-Translator to convert the database setup 
scripts for Kitware's dashboard software "CDash" (see [1] and [2]) from MySQL 
to PostgreSQL. These scripts include the full setup for a first-time 
installation and update-scripts for a version upgrade. Since the update 
scripts add a few tables to the database, and "next_unused name" doesn't know 
about already existing indices in the database, it creates index names which 
conflict with existing ones. A possible solution would be to disambiguate the 
index name by adding the table name, such as "${table}_${column}_idx". I 
proposed this as a fix for the non-unique index problem in version 0.090000 
(see [3]).

Do you see a problem with index names like "${table}_${column}_idx", or could 
the "next_unused_name" method be replaced by "${table}_${column}_idx" 
indices?

        Thanks & kind regards,
                Markus


[1] http://www.cdash.org
[2] https://www.kitware.com:8443/svn/CDash/trunk/sql
[3] 
https://sourceforge.net/tracker/index.php?func=detail&aid=2006145&group_id=47619&atid=450049

-- 
Markus Grabner - Computer Graphics and Vision
Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria
Phone: +43/316/873-5041, Fax: +43/316/873-5050
WWW: http://www.icg.tugraz.at/Members/grabner

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-- 
sqlfairy-developers mailing list
sqlfairy-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers

Reply via email to