[ 
https://issues.apache.org/jira/browse/DERBY-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13730466#comment-13730466
 ] 

Dag H. Wanvik edited comment on DERBY-532 at 8/6/13 7:17 AM:
-------------------------------------------------------------

Uploading a patch, derby-532-syntax-binding-dict-1. My local git commit record 
says:
 
    Patch derby-532-syntax-binding-dict-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.
                
      was (Author: dagw):
    Uploading a patch, derby-532-syntax-binding-dict-1. My local git commit 
record says:

atch derby-532-syntax-binding-dict-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.
                  
> 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
>              Labels: derby_triage10_11
>         Attachments: deferredConstraints.html, deferredConstraints.html, 
> derby-532-syntax-binding-dict-1.diff, derby-532-syntax-binding-dict-1.status
>
>
> 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

Reply via email to