Outdated tip in the "Adding a column section"

From: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
To: "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Outdated tip in the "Adding a column section"
Date: 2019-07-14 06:12:42
Message-ID: DB6PR0902MB2184EF7AB20D97F3167C4EEBD2CC0@DB6PR0902MB2184.eurprd09.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi,

https://www.postgresql.org/docs/current/ddl-alter.html

Tip

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, PostgreSQL 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 UPDATE, and then add any desired default as described below.

This is not true anymore since PostgreSQL 11, isn't it? If agreed, I would try to write my first patch to remove that.

Regards
Daniel

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Daniel Gustafsson 2019-07-15 08:51:36 Re: SPITupleTable members missing in docs
Previous Message Julien Rouhaud 2019-07-13 16:58:30 Re: initdb recommendations