Hi, I'm halfway thru implementing setting a column's nullness (I've done changing to null, but not changing to not null)
Peter E. said: > Using the standard precedent above, how about > > ALTER TABLE blah ALTER COLUMN col SET NOT NULL; > ALTER TABLE blah ALTER COLUMN col DROP NOT NULL; Do we want the above syntax, or this syntax: ALTER TABLE blah ALTER COLUMN col SET NOT NULL; ALTER TABLE blah ALTER COLUMN col SET NULL; The former sort of treats it like a contraint, where as the latter treats it as it is during the CREATE TABLE statement. Say in the future we want to support changing column type as well. How would we work that in? ALTER TABLE blah ALTER COLUMN col SET int4; ?????? Then we should allow people to do this: ALTER TABLE blah ALTER COLUMN col SET int4 NULL DEFAULT '3'; So they can change their entire column in one statement. So really this implies that ALTER COLUMN/SET NULL is the correct syntax, rather than ALTER COLUMN/DROP NOT NULL. In fact, maybe we could support BOTH syntaxes... Comments? Let's sort this out before I submit my patch. Regards, Chris ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster