@@ -460,16 +460,16 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
460
460
<para>
461
461
This form adds a new constraint to a table using the same constraint
462
462
syntax as <link linkend="sql-createtable"><command>CREATE TABLE</command></link>, plus the option <literal>NOT
463
- VALID</literal>, which is currently only allowed for foreign key,
464
- <literal>CHECK</literal> constraints and not-null constraints.
463
+ VALID</literal>, which is currently only allowed for foreign- key,
464
+ <literal>CHECK</literal>, and not-null constraints.
465
465
</para>
466
466
467
467
<para>
468
468
Normally, this form will cause a scan of the table to verify that all
469
469
existing rows in the table satisfy the new constraint. But if
470
470
the <literal>NOT VALID</literal> option is used, this
471
471
potentially-lengthy scan is skipped. The constraint will still be
472
- enforced against subsequent inserts or updates (that is, they'll fail
472
+ applied against subsequent inserts or updates (that is, they'll fail
473
473
unless there is a matching row in the referenced table, in the case
474
474
of foreign keys, or they'll fail unless the new row matches the
475
475
specified check condition). But the
@@ -591,7 +591,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
591
591
This form validates a foreign key, check, or not-null constraint that was
592
592
previously created as <literal>NOT VALID</literal>, by scanning the
593
593
table to ensure there are no rows for which the constraint is not
594
- satisfied. If the constraint is not enforced , an error is thrown.
594
+ satisfied. If the constraint was set to <literal>NOT ENFORCED</literal> , an error is thrown.
595
595
Nothing happens if the constraint is already marked valid.
596
596
(See <xref linkend="sql-altertable-notes"/> below for an explanation
597
597
of the usefulness of this command.)
@@ -1466,11 +1466,11 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
1466
1466
</para>
1467
1467
1468
1468
<para>
1469
- Adding an enforced <literal>CHECK</literal> or <literal>NOT NULL</literal>
1469
+ Adding a <literal>CHECK</literal> or <literal>NOT NULL</literal>
1470
1470
constraint requires scanning the table to verify that existing rows meet the
1471
1471
constraint, but does not require a table rewrite. If a <literal>CHECK</literal>
1472
- constraint is added as <literal>NOT ENFORCED</literal>, the validation will
1473
- not be performed.
1472
+ constraint is added as <literal>NOT ENFORCED</literal>, no verification will
1473
+ be performed.
1474
1474
</para>
1475
1475
1476
1476
<para>
@@ -1485,7 +1485,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
1485
1485
</para>
1486
1486
1487
1487
<para>
1488
- Scanning a large table to verify a new foreign key or check constraint
1488
+ Scanning a large table to verify new foreign- key, check, or not-null constraints
1489
1489
can take a long time, and other updates to the table are locked out
1490
1490
until the <command>ALTER TABLE ADD CONSTRAINT</command> command is
1491
1491
committed. The main purpose of the <literal>NOT VALID</literal>
0 commit comments