Hello
I investigate this bug and found reason:
> alter table t1 add column b float8 not null default random(), add primary
> key(a);
Here we call ATController (src/backend/commands/tablecmds.c) with two cmds:
AT_AddColumn and AT_AddIndex
Then we go to phase 2 in ATRewriteCatalogs:
- succesful
Allison Kaptur writes:
> I encountered a surprising error when writing a migration that both added a
> primary key to a table and added a new NOT NULL column. It threw the error "
> column "col_d" contains null values", even though I supplied a default. The
> migration looks like this:
> CREATE TA