Re: Document atthasmissing default optimization avoids verification table scan - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Document atthasmissing default optimization avoids verification table scan
Date
Msg-id CAKFQuwYGnR+5se_9GxDeoryrLLQUQGXh7pqzAktu84P=xVmrAg@mail.gmail.com
Whole thread Raw
In response to Re: Document atthasmissing default optimization avoids verification table scan  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Document atthasmissing default optimization avoids verification table scan
List pgsql-hackers
On Sat, Mar 26, 2022 at 4:14 PM David G. Johnston <david.g.johnston@gmail.com> wrote:

I would suggest rewriting 0001 to target ALTER COLUMN instead of in the generic notes section (in the paragraph beginning "Adding a column with a volatile DEFAULT") for the desired clarification.


Or, we can leave it where things are and make sure the reader understands there are two paths to having a NOT NULL constraint on the newly added column.  Something like:

"If you plan on having a NOT NULL constraint on the newly added column you should add it as a column constraint during the ADD COLUMN command.  If you add it later via ALTER COLUMN SET NOT NULL the table will have to be completely scanned in order to ensure that no null values were inserted."

David J.

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Small TAP tests cleanup for Windows and unused modules
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Add 'basebackup_to_shell' contrib module.