[OpenSER-Devel] [ openser-Bugs-1836409 ] postgres DB Schema Transformation broken

SourceForge.net noreply at sourceforge.net
Thu Nov 22 15:36:32 UTC 2007


Bugs item #1836409, was opened at 2007-11-22 13:44
Message generated for change (Comment added) made by dan_pascu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1836409&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Dan (dan_pascu)
Summary: postgres DB Schema Transformation broken

Initial Comment:
Hey guys,

i just found a problem with the DB Schema transformation.

In the transformed postgres/*-create.sh files, it has generated non-unique Index names (e.g. callid_idx) for several tables. Postgresql-8.0.13 doesn't like that and in fact the script doesn't work right.

Since XML/XSLT isn't my best friend, someone else might want to give it a try fixing it at the source ;)

Best regards

----------------------------------------------------------------------

>Comment By: Dan (dan_pascu)
Date: 2007-11-22 17:36

Message:
Logged In: YES 
user_id=1296758
Originator: NO

I changed the postgres generator to prefix indexes with the table name to
guarantee unicity. I haven't done this for mysql, as mysql doesn't require
database wide unique index names and keeping the names simple and unmangled
is prefered if possible. It would also look weird in mysql to prefix index
names with the table name.

The fix is in trunk. Please test and if some issue still persist reopen
the ticket.


----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2007-11-22 16:43

Message:
Logged In: YES 
user_id=337916
Originator: NO

Yes, i was surprised too. But i was able to confirm this on
my machine.

The automatic generation of the name like you suggested is a
good idea. Could you do the change in the mysql and postgres
XSL scripts?

Cheers,

Henning

----------------------------------------------------------------------

Comment By: Dan (dan_pascu)
Date: 2007-11-22 16:27

Message:
Logged In: YES 
user_id=1296758
Originator: NO

This is a bit surprising from postgres (database wide index names) and at
the same time sounds very error prone. Manually chosing unique index names
across all tables in a database is also a tedious task especially when
multiple developers are involved.

Because of this I'm wondering if it would be easy to make the xslt
processing automatically prefix every index for a postgres database with
the table name and an underscore (tablename_indexname)?


----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2007-11-22 14:31

Message:
Logged In: YES 
user_id=337916
Originator: NO

This is probably related to the change in r2948.

Dan, could you please take a look and revert the parts of
your commit that caused this regression?

Thank you,

Henning

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1836409&group_id=139143



More information about the Devel mailing list