Skip to content

Commit f08c9ff

Browse files
committed
Make the CREATE TABLE ref page more readable and update some information.
1 parent e97fe98 commit f08c9ff

File tree

5 files changed

+842
-2120
lines changed

5 files changed

+842
-2120
lines changed

doc/src/sgml/ref/alter_table.sgml

Lines changed: 7 additions & 9 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.29 2001/10/12 00:07:14 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.30 2001/10/22 18:14:47 petere Exp $
33
Postgres documentation
44
-->
55

@@ -161,23 +161,22 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
161161
<para>
162162
<command>ALTER TABLE</command> changes the definition of an existing table.
163163
The <literal>ADD COLUMN</literal> form adds a new column to the table
164-
using the same syntax as <xref linkend="SQL-CREATETABLE"
165-
endterm="SQL-CREATETABLE-title">.
164+
using the same syntax as <xref linkend="SQL-CREATETABLE">.
166165
The <literal>ALTER COLUMN SET/DROP DEFAULT</literal> forms
167166
allow you to set or remove the default for the column. Note that defaults
168167
only apply to subsequent <command>INSERT</command> commands; they do not
169168
cause rows already in the table to change.
170169
The <literal>ALTER COLUMN SET STATISTICS</literal> form allows you to
171170
set the statistics-gathering target for subsequent
172-
<xref linkend="sql-analyze" endterm="sql-analyze-title"> operations.
171+
<xref linkend="sql-analyze"> operations.
173172
The <literal>RENAME</literal> clause causes the name of a table or column
174173
to change without changing any of the data contained in
175174
the affected table. Thus, the table or column will
176175
remain of the same type and size after this command is
177176
executed.
178177
The ADD <replaceable class="PARAMETER">table constraint definition</replaceable> clause
179178
adds a new constraint to the table using the same syntax as <xref
180-
linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-title">.
179+
linkend="SQL-CREATETABLE">.
181180
The DROP CONSTRAINT <replaceable class="PARAMETER">constraint</replaceable> clause
182181
drops all CHECK constraints on the table (and its children) that match <replaceable class="PARAMETER">constraint</replaceable>.
183182
The OWNER clause changes the owner of the table to the user <replaceable class="PARAMETER">
@@ -205,18 +204,17 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
205204
You can use the <literal>SET DEFAULT</literal> form
206205
of <command>ALTER TABLE</command> to set the default later.
207206
(You may also want to update the already existing rows to the
208-
new default value, using <xref linkend="sql-update"
209-
endterm="sql-update-title">.)
207+
new default value, using <xref linkend="sql-update">.)
210208
</para>
211209

212210
<para>
213211
Currently only CHECK constraints can be dropped from a table. The RESTRICT
214212
keyword is required, although dependencies are not checked. The CASCADE
215213
option is unsupported. To remove a PRIMARY or UNIQUE constraint, drop the
216-
relevant index using the <xref linkend="SQL-DROPINDEX" endterm="SQL-DROPINDEX-TITLE"> command.
214+
relevant index using the <xref linkend="SQL-DROPINDEX"> command.
217215
To remove FOREIGN KEY constraints you need to recreate
218216
and reload the table, using other parameters to the
219-
<xref linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-title">
217+
<xref linkend="SQL-CREATETABLE">
220218
command.
221219
</para>
222220
<para>

0 commit comments

Comments
 (0)