Changing NOT NULL condition on column - Mailing list pgsql-admin

From Bob Smith
Subject Changing NOT NULL condition on column
Date
Msg-id 734BFEFD-8B1C-11D7-AAB1-0003933DD370@h-e.com
Whole thread Raw
Responses Re: Changing NOT NULL condition on column  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
I need to change the not-null restriction on some columns in a table,
and this doesn't seem to be possible with ALTER TABLE.  Is it safe to
connect as superuser and update pg_attribute.attnotnull directly?  Or
is there a different way to do this, other than dropping/re-creating
the whole table?

I'm currently running 7.2.3, but will be upgrading soon so I'd like to
know if this would work with 7.3 as well.

Thanks!

Bob Smith
Hammett & Edison, Inc.
bsmith@h-e.com


pgsql-admin by date:

Previous
From: "Cristina Surroca"
Date:
Subject: Re: Table size on disk
Next
From: Tom Lane
Date:
Subject: Re: Changing NOT NULL condition on column