Subject Re: [firebird-support] FK confusion
Author Ann W. Harrison
firebird@... wrote:

> I get this error message:
> This operation is not defined for system tables.Unsuccessful metadata
> update.
> Could not find UNIQUE INDEX with specified columns.

It's a lousy error message. What it should say is that it couldn't
find a unique constraint. There are three ways of declaring that a
field or set of fields should be unique: 1) declare them to be a
primary key, 2) declare them to be subject to a unique constraint,
3) declare a unique index on them. The third exists for historical
reasons and predates SQL as InterBase's primary language. The SQL
standard requires that the referenced fields in a foreign key
constraint be subject to one of the first two. So drop the unique
index, replace it with a unique constraint, and all will be well...
Except for the odd primary key, I guess...