Subject Re: Duplicate keys
Author Stephen Boyd
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@y...> wrote:
>
> Stephen,
>
> I think this might have been a bit of a wild goose chase. The
problem
> may not be a bug or corruption after all, but rather transaction
> isolation.
>
>
> Even if TrA committed before TrB does anything, unless TrB is read
> committed, it will not see the record.
>
> If you need to define a field as unique, then add it as a constraint
> on the table. Otherwise, your system is not safe for simultaneous
> transactions. Even if your transactions are read committed, I have
> included a case where it is possible to create duplicates.
>
> Adam
>
It is a constraint on the table. LDSI_STOP_ID and LDSI_ITEM_NUMBER
comprise the primary key.