How to drop a NOT NULL column constraint? - Mailing list pgsql-general

From Ed Loehr
Subject How to drop a NOT NULL column constraint?
Date
Msg-id 3A5215EF.E6174708@austin.rr.com
Whole thread Raw
Responses Re: How to drop a NOT NULL column constraint?
Re: How to drop a NOT NULL column constraint?
List pgsql-general
I have a table created like so:

    CREATE TABLE foo (
        id INTEGER NOT NULL
        ...
    );

I need to alter the table to get rid of the "NOT NULL" constraint on the
'id' column.  Can I do this using ALTER TABLE?  Or do I have to
dump/recreate/reload the table?

I'm looking for something like "ALTER TABLE foo ALTER COLUMN id DROP NOT
NULL", but the docs don't hint at it...

Regards,
Ed Loehr

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: System Tables Questions
Next
From: "Brett W. McCoy"
Date:
Subject: Re: How to drop a NOT NULL column constraint?