Forum OpenACS Q&A: Response to Could I alter a column type or modifier in PG ?

There was a thread on column type, see: https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=00054L&topic_id=OpenACS&topic=11 (well, it is about resizing, rather, not type change...)

As far as modifier is concerned, if you try

ALTER TABLE table ADD COLUMN column integer not null;

you will be prompted with:

ERROR:  Adding NOT NULL columns is not implemented.
        Add the column, then use ALTER TABLE ADD CONSTRAINT.

Then you abide and do this instead:

ALTER TABLE table ADD COLUMN column integer;
ALTER TABLE table ADD CONSTRAINT column_nn CHECK (column is not null);