Doc: fix the rewrite condition when executing ALTER TABLE ADD COLUMN
Masahiro Ikeda <ikedamsh@oss.nttdata.com>
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2024-12-03T08:13:24Z
Lists: pgsql-hackers
Attachments
- test.sql (text/plain)
- test.out (text/plain)
- v1-0001-Doc-fix-the-rewrite-condition-when-executing-ALTE.patch (text/x-diff) patch v1-0001
Hi, The documentation seems to overlook the rewrite condition when executing ALTER TABLE ADD COLUMN. The current document states that a volatile DEFAULT will trigger a rewrite of the table and its indexes. However, the table and its indexes will also be rewritten when an IDENTITY column is added, or when a column with a domain data type that has constraints is added. What do you think? Regards, -- Masahiro Ikeda NTT DATA CORPORATION
Commits
-
doc: Improve explanations when a table rewrite is needed
- 06c4f3ae804e 18.0 landed
-
doc: Explain more thoroughly when a table rewrite is needed
- 11bd8318602f 18.0 landed
-
Teach ALTER TABLE .. SET DATA TYPE to avoid some table rewrites.
- d31e2a495b6f 9.1.0 cited