Subject Re: [firebird-support] Duplicate Primary Keys
Author Ann W. Harrison
Ryan Thomas wrote:
>
> The database supplied has not been backed up (I tried so that I could reduce
> the size, but to no luck with the restoration). I can't find any trailing
> blanks on the keys, somehow there is a key in there violating the PK
> constraint!

That should not be, and probably indicates a bug somewhere. Firebird
uses the same rules (i.e. truncate trailing blanks) for comparing unique
keys as it does for other comparisons, so the loss of trailing blanks
wouldn't make any difference.

At the moment, due to bad planning, all version of Firebird and Vulcan
on my system are broken. As soon as I get a working debuggable version,
I'll have a look and see if there's anything interesting about that
database. Primary key and unique indexes can hold duplicate values as
long as no single transaction can see more than one record with a
particular value, so the id's and history of the transactions that
created the duplicates may be interesting.
>

Regards,


Ann