From: Martijn T. <m.t...@up...> - 2002-08-31 14:19:28
|
Arg - bitten by the reply thingy ... again! > Hi, > > > > Question: as the constraint name has to be unique across the database, > > > why not use that name as the actual index name? > > > > Yes, it's possible and I have written about it in my message. The only > > disadvantage is that the server should worry about the constraint name > > uniqueness not only in RDB$RELATION_CONSTRAINTS but in RDB$INDICES too, > > because there can already be an user-defined index with the same name as a > > constraint being created. It would be quite difficult to tell user why his > > constraint cannot be created in this situation. That's why I don't like > this > > solution much. > > > > And, BTW, people may want to use their own names for indices and not just > > rely on constraint names. > > Well, they don't get their own names now :) ... > > I think it makes sense, if you want to give your constraints a name, you > can do it - and FB will create indices with the same name. This would > make PLANs a whole lot more readable WITHOUT adding anything > to ALTER TABLE ADD CONSTRAINT statements. Perhaps, > additionaly, you can also implement INDEX <indexname> stuff - but > for starters, I would be helped with an index named like the constraint. > > Hey, if that names conflicts with an existing name, reject the constraint, > and tell them why. This should be in the engine already, as I can easily > create an index named RDB$PRIMARY912 if I like... > > > With regards, > > Martijn Tonies > InterBase Workbench - the developer tool for InterBase and Firebird > http://www.interbaseworkbench.com > > Upscene Productions > http://www.upscene.com > > "This is an object-oriented system. > If we change anything, the users object." > |