Joe Horsnell <j...@bambooloans.com> writes: > The documentation (https://www.postgresql.org/docs/10/ddl-alter.html) clearly > states that adding a column with a default requires updating all the rows in > the table, to store the new column value (this is prior to PG11, obviously).
> Obviously the desired effect of adding the column default without rewriting > all the rows in the table can be achieved by adding the nullable column first > with no default, then changing the default, but out of curiosity; was there a > specific technical reason for the behaviour described above, or was it a > conscious design choice? We read the SQL spec as requiring this behavior. regards, tom lane