Re: from not null field to nullable field? - Mailing list pgsql-sql

From Wim Ceulemans
Subject Re: from not null field to nullable field?
Date
Msg-id 3976B081.3AC847A4@nice.be
Whole thread Raw
In response to from not null field to nullable field?  (Carolyn Lu Wong <carolyn@kss.net.au>)
List pgsql-sql
Carolyn Lu Wong wrote:
> 
> I have a field in a table that has been defined 'not null'. Is it
> possible to remove this constraint? I don't see this option under 'alter
> table'.

update pg_attribute set attnotnull = 'f' where oid = oidofnotnullcolumn;
vacuum analyze;

Regards
Wim


pgsql-sql by date:

Previous
From: Wim Ceulemans
Date:
Subject: Re: primary key question
Next
From: "Emils Klotins"
Date:
Subject: test