Re: Changing from NOT NULL to NULL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing from NOT NULL to NULL
Дата
Msg-id 16118.1076886507@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Changing from NOT NULL to NULL  (Rob Mosher <mosher@andrews.edu>)
Ответы Re: Changing from NOT NULL to NULL  (Rob Mosher <mosher@andrews.edu>)
Список pgsql-novice
Rob Mosher <mosher@andrews.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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Nabil Sayegh
Дата:
Сообщение: Re: Changing from NOT NULL to NULL
Следующее
От: "V i s h a l Kashyap @ [Sai Hertz And Control Systems]"
Дата:
Сообщение: PostgreSQL From xinit