| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера