[
https://issues.apache.org/jira/browse/DERBY-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13751279#comment-13751279
]
ASF subversion and git services commented on DERBY-532:
-------------------------------------------------------
Commit 1517823 from [~dagw] in branch 'code/trunk'
[ https://svn.apache.org/r1517823 ]
DERBY-532 Support deferrable constraints
Patch derby-532-syntax-binding-dict-all-1. This patch wires in the syntax
for deferred constraints (aka "constraint characteristics"). It also
does
- binding checks for CREATE TABLE constraints and SET constraints
statement (new). Binding is still missing for ALTER TABLE
constraints clauses.
- temporarily throws not yet implemented (0A000.S) for all usage
*except* when characteristics coincide with the current (and future)
Derby defaults, i.e. NOT DEFERRABLE [INITIALLY IMMEDIATE] ENFORCED
- checks inconsistencies in characteristics (illegal combinations), cf.
42X97 "Conflicting constraint characteristics for constraint"
- implements implied DEFERRABLE of (only) INITIALLY DEFERRED is
specified.
- if the property "derby.constraintsTesting" is set, persists
characteristics to dictionary by overloading the existing STATE
character according to specification. This property will go away
once the feature set is implemented, only implemented not to be able
to test dictionary persistence
- throws 42XAK "Constraint characteristics not allowed for NOT NULL."
for NOT NULL characteristics since this constraint type is not
explicitly implemented as a constraint in Derby (yet, at least)
- adds a new test, ConstraintCharacteristicsTest to test the above and
wires it into the lang suite.
(part 2):
- Elaborates ALTER TABLE ALTER TABLE, correcting syntax, adding name
binding and updating dictionary (subject to the property
derby.constraintsTesting) in a new AlterConstraintConstantAction
class.
- Built out tests in ConstraintCharacteristicsTest to systematically
check all possible characteristics combinations in all cases, and
adding tests for ALTER TABLE ALTER TABLE, including dictionary
updates.
> 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,
> 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
>
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira