So I can add a column like:
ALTER TABLE t ADD c SMALLINT
and I can then set it's default value like:
ALTER TABLE t ALTER c SET DEFAULT 0
but how do set that new column to be NOT NULL? The postgres docs say
do something like:
ALTER TABLE t ADD (table constraint definition)
so I would do that like:
ALTER TABLE ADD c NOT NULL
ALTER TABLE ADD CONSTRAINT c NOT NULL
each time it fails on the 'NOT'. How do I add that constraint?
* Philip Molter
* DataFoundry.net
* http://www.datafoundry.net/
* philip@datafoundry.net