Re: from not null field to nullable field?

From: Wim Ceulemans <Wim(dot)Ceulemans(at)nice(dot)be>
To: Carolyn Lu Wong <carolyn(at)kss(dot)net(dot)au>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: from not null field to nullable field?
Date: 2000-07-20 07:55:45
Message-ID: 3976B081.3AC847A4@nice.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Emils Klotins 2000-07-20 08:53:08 test
Previous Message Wim Ceulemans 2000-07-20 07:45:31 Re: primary key question