You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ch...@apache.org on 2014/06/11 15:21:22 UTC
svn commit: r1601885 - in /db/derby/docs/trunk/src/ref: rrefsqlj13590.dita
rrefsqljconstrchar.dita rrefsqljsetconstr.dita
Author: chaase3
Date: Wed Jun 11 13:21:22 2014
New Revision: 1601885
URL: http://svn.apache.org/r1601885
Log:
DERBY-6571 Document deferrable constraints
Modified 3 Reference Manual topics to add upgrade information.
Patch: DERBY-6571-upgrade.diff
Modified:
db/derby/docs/trunk/src/ref/rrefsqlj13590.dita
db/derby/docs/trunk/src/ref/rrefsqljconstrchar.dita
db/derby/docs/trunk/src/ref/rrefsqljsetconstr.dita
Modified: db/derby/docs/trunk/src/ref/rrefsqlj13590.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj13590.dita?rev=1601885&r1=1601884&r2=1601885&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj13590.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj13590.dita Wed Jun 11 13:21:22 2014
@@ -20,6 +20,9 @@ limitations under the License.
"../dtd/reference.dtd">
<reference id="rrefsqlj13590" xml:lang="en-us">
<title>CONSTRAINT clause</title>
+<shortdesc>A CONSTRAINT clause is an optional part of a CREATE TABLE statement
+or an ALTER TABLE statement. A constraint is a rule to which data
+must conform. Constraint names are optional.</shortdesc>
<prolog><metadata>
<keywords><indexterm>CONSTRAINT clause</indexterm><indexterm>Constraints</indexterm><indexterm>Storage
properties<indexterm>for indexes backing constraints</indexterm></indexterm><indexterm>Backing
@@ -28,10 +31,10 @@ page size for</indexterm><indexterm>spec
</keywords>
</metadata></prolog>
<refbody>
-<section> <p>A CONSTRAINT clause is an optional part of a <xref href="rrefsqlj24513.dita#rrefsqlj24513">CREATE TABLE statement</xref> or <xref
-href="rrefsqlj81859.dita#rrefsqlj81859">ALTER TABLE statement</xref>. A constraint is a rule to which data
-must conform. Constraint names are optional.</p> <p>A CONSTRAINT can be one
-of the following: <ul>
+<section>
+<p>See <xref href="rrefsqlj24513.dita"/> and <xref href="rrefsqlj81859.dita#"/>
+for details on those statements.</p>
+<p>A CONSTRAINT can be one of the following: <ul>
<li><indexterm>Column-level constraints</indexterm><indexterm>Constraints<indexterm>column-level</indexterm></indexterm>
A <i><xref href="rrefsqlj16095.dita#rrefsqlj16095">columnLevelConstraint</xref></i>
<p>Column-level constraints refer to a single column
@@ -89,6 +92,11 @@ details.</p>
constraints immediately. By default, a constraint is checked as soon as a
statement completes. Deferrable constraints allow temporary breaches of
constraints for more flexible insert and update operations.</p>
+<note>Deferred constraints are available only after a database has been fully
+upgraded to <ph conref="../conrefs.dita#prod/productshortname"></ph>
+Release 10.11 or higher. (See "Upgrading a database" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph> for more information.) They
+cannot be used in a database that is at Release 10.10 or lower.</note>
<p>When a deferrable constraint's constraint mode is DEFERRED before execution
of a statement starts, the checking of the constraint does not take place at the
end of the statement execution as usual, but only when it is explicitly or
Modified: db/derby/docs/trunk/src/ref/rrefsqljconstrchar.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljconstrchar.dita?rev=1601885&r1=1601884&r2=1601885&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljconstrchar.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljconstrchar.dita Wed Jun 11 13:21:22 2014
@@ -47,6 +47,15 @@ characteristics, you must drop the const
<p>NOT NULL constraints are not deferrable; all others are deferrable.
The NOT NULL constraint can, however, be dropped and recreated if desired. This
will require a full table scan.</p>
+<p>A constraint can be specified as DEFERRABLE or NOT DEFERRABLE, or with a
+<i>constraintCheckTime</i> of INITIALLY DEFERRED or INITIALLY IMMEDIATE, only
+after a database has been fully upgraded to
+<ph conref="../conrefs.dita#prod/productshortname"></ph> Release 10.11 or
+higher. (See "Upgrading a database" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph> for more information.) These
+keywords have no meaning in a database that is at Release 10.10 or lower.</p>
+<p>After a full upgrade to Release 10.11 or higher, old constraints on the
+database will be converted to NOT DEFERRABLE, the default value.</p>
<note>Deferred constraints sometimes impose extra performance overhead to allow
for the deferred checking. If your application does not require deferred
checking, we recommend that you make constraints NOT DEFERRABLE (the
Modified: db/derby/docs/trunk/src/ref/rrefsqljsetconstr.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljsetconstr.dita?rev=1601885&r1=1601884&r2=1601885&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljsetconstr.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljsetconstr.dita Wed Jun 11 13:21:22 2014
@@ -48,6 +48,11 @@ SET CONSTRAINTS on a <xref href="rrefsql
constraint</xref>, you will need to find the name of the corresponding index by
performing queries against the system tables, which is cumbersome and requires
additional non-portable SQL.</p>
+<note>The SET CONSTRAINTS statement is valid only after a database has been fully
+upgraded to <ph conref="../conrefs.dita#prod/productshortname"></ph>
+Release 10.11 or higher. (See "Upgrading a database" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph> for more information.) This
+statement has no meaning in a database that is at Release 10.10 or lower.</note>
</section>
<refsyn><title>Syntax</title>
<codeblock><b>SET CONSTRAINTS <i>constraintNameList</i> { DEFERRED | IMMEDIATE }</b></codeblock>