On Tue, 21 Jan 2003, Roger Burton West wrote: > On Tue, Jan 21, 2003 at 10:43:46AM +0000, Raf wrote: > >borg=# ALTER TABLE my_table ALTER COLUMN my_column DROP NOT NULL; > >ERROR: parser: parse error at or near "NOT" > >Any ideas? Is it just restricted to dropping defaults? > > I don't understand what you're trying to do. "DEFAULT" is a > characteristic of a table column; it can be unset or have a value. Using > ALTER TABLE, you can change the value of the DEFAULT.
I'm trying to drop the NOT NULL constraint on a column. Might try out Ali's solution or copy to a temporary table and rebuild the original table with correct attributes. Thanks to both of you. Cheers, Rafiq
