db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r1528851 - /db/derby/docs/trunk/src/ref/rrefconstraintname.dita
Date Thu, 03 Oct 2013 13:30:26 GMT
Author: chaase3
Date: Thu Oct  3 13:30:25 2013
New Revision: 1528851

URL: http://svn.apache.org/r1528851
Log:
DERBY-6367  Reference Manual incorrectly states that you can't schema-qualify 
constraint names

Modified topic in Reference Manual.

Patch: DERBY-6367.diff

Modified:
    db/derby/docs/trunk/src/ref/rrefconstraintname.dita

Modified: db/derby/docs/trunk/src/ref/rrefconstraintname.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefconstraintname.dita?rev=1528851&r1=1528850&r2=1528851&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefconstraintname.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefconstraintname.dita Thu Oct  3 13:30:25 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>
 



Mime
View raw message