![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This is probably not the proper place to pose a question about how SQL "should" work, but I don't know of a better one. Any suggestions? I am curious to know the moment to which a deferred constraint should be understood to be deferred. I assume it should be after the last update in a transaction (signalled by a COMMIT) but before the transaction surrenders read consistency. But if that's the case, one can construct a pair of concurrent transactions that severally satisfy all constraints yet jointly leave the database inconsistent. So what's the defined behaviour? (At this moment I'm not interested in what we'd like it to be; I want to know what the standards define it to be.) |
#3
| |||
| |||
|
|
You assume the standard defines the behavior. You would have to read the standards document to see if it does. |
#4
| |||
| |||
|
|
Bob Badour wrote: You assume the standard defines the behavior. You would have to read the standards document to see if it does. That's plan B, if no one who has it at their fingertips is kind enough to give up five seconds of their time to save me some (dreary) hours. |
#5
| |||
| |||
|
|
Roy Hann wrote: Bob Badour wrote: You assume the standard defines the behavior. You would have to read the standards document to see if it does. That's plan B, if no one who has it at their fingertips is kind enough to give up five seconds of their time to save me some (dreary) hours. Five seconds?!? Bwa-ha-ha-ha-ha Maybe Joe will step in and help. |
#6
| |||
| |||
|
|
Roy Hann wrote: This is probably not the proper place to pose a question about how SQL "should" work, but I don't know of a better one. Any suggestions? I am curious to know the moment to which a deferred constraint should be understood to be deferred. I assume it should be after the last update in a transaction (signalled by a COMMIT) but before the transaction surrenders read consistency. But if that's the case, one can construct a pair of concurrent transactions that severally satisfy all constraints yet jointly leave the database inconsistent. So what's the defined behaviour? (At this moment I'm not interested in what we'd like it to be; I want to know what the standards define it to be.) You assume the standard defines the behavior. You would have to read the standards document to see if it does. |
#7
| |||
| |||
|
|
So now, after more that 12 hours, I have my answer. * My gift to the Internet is to share it here. |
I would not have rattled it off
#8
| |||
| |||
|
|
This is probably not the proper place to pose a question about how SQL "should" work, but I don't know of a better one. *Any suggestions? * I am curious to know the moment to which a deferred constraint should be understood to be deferred. *I assume it should be after the last update in a transaction (signalled by a COMMIT) but before the transaction surrenders read consistency. *But if that's the case, one can construct a pair of concurrent transactions that severally satisfy all constraints yet jointly leave the database inconsistent. * So what's the defined behaviour? *(At this moment I'm not interested in what we'd like it to be; I want to know what the standards define it to be.) -- Roy |
#9
| |||
| |||
|
|
So now, after more that 12 hours, I have my answer. * My gift to theInternet is to share it here. Thank you for saving me the work *I would not have rattled it offin 5 minutes. It is worth mentioning that a constraint can be initially deffered or active, then explictiy set the other way. But the goal is that at the end of session, all constraints must be true. Years ago, Jim Melton had a paper on some ambigous situations which I cannot remember. |
#10
| |||
| |||
|
|
TWO : the goal is NOT that "at the end of the session, all constraints must be _TRUE_", the goal is that at the end of the session, all constraints must be _SATISFIED_. |
![]() |
| Thread Tools | |
| Display Modes | |
| |