Subject | AW: AW: [firebird-support] Possible bug with CHECK constraint |
---|---|
Author | Steffen Heil |
Post date | 2004-10-03T08:38:46Z |
Hi
This is as the 50-day bug in Windows 98.
You could insist, that it is not a bug, but a feature to force restarts of
windows every 50 days.
I still regard this as a bug.
Check constraints need to keep the database consistent, where consistent
means that the condition is fullfilled.
I know that inserted data is only visible to the inserting
connection/transaction. However, commits are atomic serializable action that
could enforce check-constraints in the right way. Even with aggregation
functions.
Regards,
Steffen
[Non-text portions of this message have been removed]
> Precisely. Don't write check constraints with logic that doesn't providethe check you require. In simple terms: garbage in, garbage out.
This is as the 50-day bug in Windows 98.
You could insist, that it is not a bug, but a feature to force restarts of
windows every 50 days.
I still regard this as a bug.
> I could go on to say NEVER define a check constraint based an aggregation.Think about it a little....
Check constraints need to keep the database consistent, where consistent
means that the condition is fullfilled.
I know that inserted data is only visible to the inserting
connection/transaction. However, commits are atomic serializable action that
could enforce check-constraints in the right way. Even with aggregation
functions.
Regards,
Steffen
[Non-text portions of this message have been removed]