Subject | CHECK Constraints (was: Re: [firebird-support] Re: Checking periods don't overlap) |
---|---|
Author | johnsparrowuk |
Post date | 2004-06-15T14:35:24Z |
My point is that check constraints should work in a way consistent
with indexes, which at the moment they don't.
From testing I can see that a unique index can see uncommitted values
in another transaction. It can also see committed values that have
been deleted in another transaction (the point you make). But as soon
as that other trans commits the delete, I am allowed to insert the
new record without restarting the other (snapshot) transacton.
It depends on your definition of 'dirty read' I suppose. The jargon
was developed before multi-gen systems were designed I guess, so
there could be some confusion.
John
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
with indexes, which at the moment they don't.
From testing I can see that a unique index can see uncommitted values
in another transaction. It can also see committed values that have
been deleted in another transaction (the point you make). But as soon
as that other trans commits the delete, I am allowed to insert the
new record without restarting the other (snapshot) transacton.
It depends on your definition of 'dirty read' I suppose. The jargon
was developed before multi-gen systems were designed I guess, so
there could be some confusion.
John
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
> You seems to believe that e.g. unique constraint could be writtenrecord version,
> as check constraint that can read uncommitted data ? NO way.
> Dirty-read would read just last (be it committed or uncommitted)
> whereas unique constraint will check whole chain of versions.