How to drop a NOT NULL column constraint?

Поиск
Список
Период
Сортировка
От Ed Loehr
Тема How to drop a NOT NULL column constraint?
Дата
Msg-id 3A5215EF.E6174708@austin.rr.com
обсуждение исходный текст
Ответы Re: How to drop a NOT NULL column constraint?
Re: How to drop a NOT NULL column constraint?
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: System Tables Questions
Следующее
От: "Brett W. McCoy"
Дата:
Сообщение: Re: How to drop a NOT NULL column constraint?