On Sat, Mar 26, 2022 at 4:14 PM David G. Johnston <
david.g.johns...@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.

Reply via email to