Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit26e8a4f

Browse files
committed
Repair erroneous ALTER DROP CONSTRAINT example.
1 parentbe4e505 commit26e8a4f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎doc/src/sgml/ref/alter_table.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.30 2001/10/22 18:14:47 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.31 2001/11/10 20:13:37 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -178,7 +178,7 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
178178
adds a new constraint to the table using the same syntax as <xref
179179
linkend="SQL-CREATETABLE">.
180180
The DROP CONSTRAINT <replaceable class="PARAMETER">constraint</replaceable> clause
181-
drops allCHECKconstraints on the table (and its children) that match <replaceable class="PARAMETER">constraint</replaceable>.
181+
drops all constraints on the table (and its children) that match <replaceable class="PARAMETER">constraint</replaceable>.
182182
The OWNER clause changes the owner of the table to the user <replaceable class="PARAMETER">
183183
new user</replaceable>.
184184
</para>
@@ -207,15 +207,15 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
207207
new default value, using <xref linkend="sql-update">.)
208208
</para>
209209

210-
<para>
211-
Currently only CHECK constraints can be dropped from a table. The RESTRICT
212-
keyword is required, although dependencies are not checked. The CASCADE
213-
option is unsupported. To remove a PRIMARY or UNIQUE constraint, drop the
214-
relevant index using the <xref linkend="SQL-DROPINDEX"> command.
210+
<para>
211+
In DROP CONSTRAINT, the RESTRICT keyword is required, although
212+
dependencies are not yet checked. The CASCADE option is unsupported.
213+
Currently DROP CONSTRAINT drops only CHECK constraints.
214+
To remove a PRIMARY or UNIQUE constraint, drop the
215+
relevant index using the <xref linkend="SQL-DROPINDEX"> command.
215216
To remove FOREIGN KEY constraints you need to recreate
216217
and reload the table, using other parameters to the
217-
<xref linkend="SQL-CREATETABLE">
218-
command.
218+
<xref linkend="SQL-CREATETABLE"> command.
219219
</para>
220220
<para>
221221
For example, to drop all constraints on a table <literal>distributors</literal>:
@@ -277,7 +277,7 @@ ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5);
277277
<para>
278278
To remove a check constraint from a table and all its children:
279279
<programlisting>
280-
ALTER TABLE distributors DROP CONSTRAINT zipchk;
280+
ALTER TABLE distributors DROP CONSTRAINT zipchk RESTRICT;
281281
</programlisting>
282282
</para>
283283

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp