Re: Changing from NOT NULL to NULL

From: Nabil Sayegh <postgresql(at)e-trolley(dot)de>
To: Rob Mosher <mosher(at)andrews(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Changing from NOT NULL to NULL
Date: 2004-02-15 23:20:54
Message-ID: 402FFED6.40808@e-trolley.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Rob Mosher wrote:
> Is there anyway I can change a field to allowing nulls without dumping
> the table, dropping it, recreating it as desired, and filling all the
> data back in?

ALTER TABLE tab ALTER COLUMN col DROP NOT NULL;

HTH
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Glaesemann 2004-02-15 23:33:20 Re: Changing from NOT NULL to NULL
Previous Message Tom Lane 2004-02-15 23:08:27 Re: Changing from NOT NULL to NULL