Here's v5. I removed the business of renaming constraints in child
relations: recursing now just relies on matching column names. Each
column has only one NOT NULL constraint; if you try to add another,
nothing happens. All in all, this code is pretty similar to how we
handle inheritance of columns, which I think is good.
I added a mention that this funny syntax
ALTER TABLE tab ADD CONSTRAINT NOT NULL col;
is not standard. Maybe it's OK, but it seems a bit too prominent to me.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/