Re: Changing from NOT NULL to NULL

From: Rob Mosher <mosher(at)andrews(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Changing from NOT NULL to NULL
Date: 2004-02-16 16:03:05
Message-ID: 4030E9B9.6000908@andrews.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I will try this out as soon as I can. Thanks to all who replied.

Rob Mosher

Tom Lane wrote:

>Rob Mosher <mosher(at)andrews(dot)edu> writes:
>
>
>>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 ... DROP NOT NULL does the trick in recent releases. Before
>that, you could resort to manually poking the attnotnull flag in
>the pg_attribute row for the field.
>
> regards, tom lane
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message joseph speigle 2004-02-16 17:12:56 Re: PostgreSQL From xinit
Previous Message user 2004-02-16 15:29:53 Re: Createdb fails