Re: Not null contraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Not null contraints
Дата
Msg-id 1668.971497592@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Not null contraints  ("Tamsin" <tg_mail@bryncadfan.co.uk>)
Ответы Re: Not null contraints  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-general
"Tamsin" <tg_mail@bryncadfan.co.uk> writes:
> I want to remove a not null constraint from a table.  I've read the posts
> about having to rename, recreate without not nulls & insert back into the
> table.  This is fine, but the table also has a lot of foreign keys/rules etc
> & recreating all these is a bit of pain.
> I tried updating pg_attribute & setting attnotnull to 'f' for the field in
> question.  This seems to have worked.  Is it safe?! - is there anything else
> I should be aware of?

Yup, that should do the trick.  Not much magic here...

            regards, tom lane

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

Предыдущее
От: "Dominic J. Eidson"
Дата:
Сообщение: Re: Question about pg_dump
Следующее
От: The Hermit Hacker
Дата:
Сообщение: RE: Matlab Mex Interface