aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-02-14 23:17:35 -0500
committerRobert Haas <rhaas@postgresql.org>2011-02-14 23:40:05 -0500
commit0d90dc16f87bd991d7eb9f536ca46acef7586d95 (patch)
treef769863a1ee93935f6d968728ea3374384d6c85b /doc/src
parent8e1124eeeb128ef87045debfeb8f24cd6dbab874 (diff)
downloadpostgresql-0d90dc16f87bd991d7eb9f536ca46acef7586d95.tar.gz
postgresql-0d90dc16f87bd991d7eb9f536ca46acef7586d95.zip
Avoid a few more SET DATA TYPE table rewrites.
When the new type is an unconstrained domain over the old type, we don't need to rewrite the table. Noah Misch and Robert Haas
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_table.sgml15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 7e6e72f008e..b8c4c507a2c 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -766,13 +766,14 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable>
<para>
Adding a column with a non-null default or changing the type of an
existing column will require the entire table and indexes to be rewritten.
- As an exception, if the old type type is binary coercible to the new
- type and the <literal>USING</> clause does not change the column contents,
- a table rewrite is not needed, but any indexes on the affected columns
- must still be rebuilt. Adding or removing a system <literal>oid</> column
- also requires rewriting the entire table. Table and/or index rebuilds may
- take a significant amount of time for a large table; and will temporarily
- require as much as double the disk space.
+ As an exception, if the <literal>USING</> clause does not change the column
+ contents and the old type is either binary coercible to the new type or
+ an unconstrained domain over the new type, a table rewrite is not needed,
+ but any indexes on the affected columns must still be rebuilt. Adding or
+ removing a system <literal>oid</> column also requires rewriting the entire
+ table. Table and/or index rebuilds may take a significant amount of time
+ for a large table; and will temporarily require as much as double the disk
+ space.
</para>
<para>