>______________________________________
>From: Daniel Westermann (DWE)
>Sent: Monday, July 15, 2019 13:01
>To: pgsql-hack...@postgresql.org
>Subject: Documentation fix for adding a column with a default value
>
>Hi,
>
>the tip in the "Adding a column" section is not true anymore since PostgreSQL 
>11:
>
>https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER-ADDING-A-COLUMN<https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER-ADDING-A-COLUMN>
>
>Attached a patch proposal for this.

Seems the first mail didn't make it ...

Regards
Daniel










diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 9301f0227d..62058ec3b1 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -1318,12 +1318,7 @@ ALTER TABLE products ADD COLUMN description text CHECK (description &lt;&gt; '')
   <tip>
    <para>
     Adding a column with a default requires updating each row of the
-    table (to store the new column value).  However, if no default is
-    specified, <productname>PostgreSQL</productname> is able to avoid
-    the physical update.  So if you intend to fill the column with
-    mostly nondefault values, it's best to add the column with no default,
-    insert the correct values using <command>UPDATE</command>, and then add any
-    desired default as described below.
+    table (to store the new column value) if the default is volatile.
    </para>
   </tip>
   </sect2>

Reply via email to