diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-01-25 18:50:35 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-01-25 18:52:03 -0500 |
commit | 2c3e29299842f6de74ff96d35ecaa1cc98fbcd5d (patch) | |
tree | e44848a3d111bdf4107b4e247d883fef443e4f76 | |
parent | 39b5e5f3370258cae843e8cc83eccd59ddb532dd (diff) | |
download | postgresql-2c3e29299842f6de74ff96d35ecaa1cc98fbcd5d.tar.gz postgresql-2c3e29299842f6de74ff96d35ecaa1cc98fbcd5d.zip |
Correct ALTER TYPE -> SET DATA TYPE in ALTER TABLE documentation.
The latter is the correct name of the operation to change the data type
of a column.
Noah Misch
-rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 4c582f0d85a..a9fc887c778 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -719,7 +719,7 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable> </para> <para> - The fact that <literal>ALTER TYPE</> requires rewriting the whole table + The fact that <literal>SET DATA TYPE</> requires rewriting the whole table is sometimes an advantage, because the rewriting process eliminates any dead space in the table. For example, to reclaim the space occupied by a dropped column immediately, the fastest way is: @@ -734,15 +734,15 @@ ALTER TABLE table ALTER COLUMN anycol TYPE anytype; </para> <para> - The <literal>USING</literal> option of <literal>ALTER TYPE</> can actually + The <literal>USING</literal> option of <literal>SET DATA TYPE</> can actually specify any expression involving the old values of the row; that is, it can refer to other columns as well as the one being converted. This allows - very general conversions to be done with the <literal>ALTER TYPE</> + very general conversions to be done with the <literal>SET DATA TYPE</> syntax. Because of this flexibility, the <literal>USING</literal> expression is not applied to the column's default value (if any); the result might not be a constant expression as required for a default. This means that when there is no implicit or assignment cast from old to - new type, <literal>ALTER TYPE</> might fail to convert the default even + new type, <literal>SET DATA TYPE</> might fail to convert the default even though a <literal>USING</literal> clause is supplied. In such cases, drop the default with <literal>DROP DEFAULT</>, perform the <literal>ALTER TYPE</>, and then use <literal>SET DEFAULT</> to add a suitable new |