> ALTER TABLE blah ALTER [COLUMN] col SET NOT NULL; > > and > > ALTER TABLE blah ALTER [COLUMN] col DROP NOT NULL; > > This is synchronous with the SET/DROP default stuff and is > extensible in the > future to fit in with column type changing. > > Of course, it can always be changed in the parser without > affecting my code.
Also, in the future, once (if) the 'SET TYPE' column type changing function has been implemented, we can create a meta-command to do it all in one statement (for reliability and consistency for users). It could look like this: ALTER TABLE blah ALTER [COLUMN] col [SET TYPE type] [{SET | DROP} NOT NULL] [{SET | DROP} DEFAULT [default]] And a command like this should be able to just re-use already written code. However, some interdependency checks might be more efficient if their done before any changes are actually made! ie. Changing type to boolean and then setting default to 'blah' in one statement, etc. Chris ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html