Open annrpom opened 9 months ago
I commented on the other issue prior to seeing this one as open. copy/pasted below
If documenting the footgun is the desired path, I'm guessing the place to document it would be in the subcommands section of Alter Table. Perhaps a WARNING section above the existing TIP section along the lines of:
WARNING: If multiple subcommands conflict, the db may either reject the entire statement or use the final resulting schema as the only schema change to be processed.
A community issue came in with an observation about ALTER TABLE ... ADD COLUMN (#116301); they expect the following examples to behave the same way:
Ex 1
Ex 2
The first example leads to a resulting table with "true" still in column
col
; the second essentially cancels theNOT NULL DEFAULT true
constraint - resulting in a table with NULLs in columncol
.This is in fact a valid behavior and not a bug, but can be unexpected to some users; so, it might be worth documenting.