[
https://issues.apache.org/jira/browse/DERBY-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13810229#comment-13810229
]
Dag H. Wanvik commented on DERBY-532:
-------------------------------------
As far as precedent for XA, I haven't been able to find much, but I did find
that the Informix documentation mentions throwing XAException#XA_RBINTEGRITY
for unsatisfied deferred constraints in the API docs for both xa_prepare() and
xa_commit(). I had chosen the same exception, so it seems that's right. The
case of xa_commit applies to the possibility for commiting 1PC transactions
[i.e. xa_commit(xid, true)], which do not require xa_prepare.
> Support deferrable constraints
> ------------------------------
>
> Key: DERBY-532
> URL: https://issues.apache.org/jira/browse/DERBY-532
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Jörg von Frantzius
> Assignee: Dag H. Wanvik
> Labels: derby_triage10_11
> Attachments: deferredConstraints.html, deferredConstraints.html,
> deferredConstraints.html, derby-532-syntax-binding-dict-1.diff,
> derby-532-syntax-binding-dict-1.status, derby-532-syntax-binding-dict-2.diff,
> derby-532-syntax-binding-dict-2.status,
> derby-532-syntax-binding-dict-all-1.diff,
> derby-532-testAlterConstraintInvalidation.diff,
> derby-532-testAlterConstraintInvalidation.status, derby-532-unique-pk-1.diff,
> derby-532-unique-pk-1.status, derby-532-unique-pk-2.diff, derby-532-xa-1.diff
>
>
> In many situations it is desirable to have constraints checking taking place
> only at transaction commit time, and not before. If e.g. there is a chain of
> foreign key constraints between tables, insert statements have to be ordered
> to avoid constraint violations. If foreign key references are circular, the
> DML has to be split into insert statements and subsequent update statements
> by the user.
> In other words, with deferred constraints checking, life is much easier for
> the user. Also it can create problems with softwares such as
> object-relational mapping tools that are not prepared for statement ordering
> and thus depend on deferred constraints checking.
--
This message was sent by Atlassian JIRA
(v6.1#6144)