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 2013/10/03 15:44:28 UTC
svn commit: r1528862 -
/db/derby/docs/branches/10.10/src/ref/rrefconstraintname.dita
Author: chaase3
Date: Thu Oct 3 13:44:28 2013
New Revision: 1528862
URL: http://svn.apache.org/r1528862
Log:
DERBY-6367 Reference Manual incorrectly states that you can't schema-qualify constraint names
Merged patch DERBY-6367.diff to 10.10 doc branch from trunk revision 1528851.
Modified:
db/derby/docs/branches/10.10/src/ref/rrefconstraintname.dita
Modified: db/derby/docs/branches/10.10/src/ref/rrefconstraintname.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/ref/rrefconstraintname.dita?rev=1528862&r1=1528861&r2=1528862&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/ref/rrefconstraintname.dita (original)
+++ db/derby/docs/branches/10.10/src/ref/rrefconstraintname.dita Thu Oct 3 13:44:28 2013
@@ -23,13 +23,22 @@ limitations under the License.
<refbody>
<section><p>A <i>constraintName</i> represents a constraint (see
<xref href="rrefsqlj13590.dita#rrefsqlj13590">CONSTRAINT clause</xref>).</p>
-<p>You cannot qualify a <i>constraintName</i> with a <i><xref
-href="rrefschemaname.dita#rrefschemaname">schemaName</xref></i>.</p>
</section>
-<section><title>Syntax</title> <codeblock><b><i><xref href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i></b></codeblock></section>
+<section><title>Syntax</title>
+<codeblock><b>[ <i><xref href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i></b></codeblock>
+<p>You can qualify a <i>constraintName</i> with a <i>schemaName</i>, but the
+<i>schemaName</i> of the constraint must be the same as the <i>schemaName</i> of
+the table on which the constraint is placed.</p>
+</section>
<section><title>Example</title> <codeblock><b><ph>-- country_fk2 is a constraint name</ph>
CREATE TABLE DETAILED_MAPS (COUNTRY_ISO_CODE CHAR(2)
-CONSTRAINT country_fk2 REFERENCES COUNTRIES)</b></codeblock></section>
+CONSTRAINT country_fk2 REFERENCES COUNTRIES)</b></codeblock>
+<codeblock><b>-- s1.c1 is a schema-qualified constraint; the schema name
+-- is not required here, but if specified must match that of the table
+CREATE SCHEMA s1;
+CREATE TABLE s1.t1 ( a INT, CONSTRAINT s1.c1 CHECK ( a > 0 ) );</b></codeblock>
+</section>
</refbody>
</reference>