RE: Create table error
Posted in 2000
We have encountered this bug before. An "Alter table add column not null' generates a constraint name that is incorrectly coded as a user defined constraint name. The generated constraint name is "tabid"-"seq #". An export of the database creates the sql file with the constraint name listed. The subsequent import picks a new tabid, the tabid in the constraint name inside the sql has already be generated, Therefore the duplicate. If you do not define your own constraint names you can write a script to remove all constraint names from the sql file. If you do have some specifically named constraints then you must write a "smarter" script based on the naming pattern or remove them by hand. We encounter this bug in 7.30.fc7 HTH ps. I believe constraint names are unique to the database, not the table. -----Original Message----- From: Obnoxio The Clown [mailto:obnoxio@hotmail.com] Sent: Wednesday, January 12, 2000 3:05 AM To: harmanj@agric.nsw.gov.au; informix-list@iiug.org Subject: Re: Create table error From: John Harman <harmanj@agric.nsw.gov.au> > > When running an sql to create a table, I'm getting a 'constraint >already exists' error, with an id like 'n359_1147'. Can anyone give me a >clue what causes this ?? Um. Errr. You already have a constraint called n359_1147 on another table. Try naming explicitly (to something different) all the contraints on your new table. (The one that's failing is a NOT NULL, I guess) ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com