Re: Modifying an existing constraint?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Modifying an existing constraint?
Дата
Msg-id 14983.1086410797@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Modifying an existing constraint?  (Lynna Landstreet <lynna@gallery44.org>)
Список pgsql-novice
Lynna Landstreet <lynna@gallery44.org> writes:
> Does anyone know if it's possible to modify an existing table constraint -
> for example, to add "ON DELETE CASCADE" to an existing foreign key
> constraint? Or would I have to recreate the table to add that?

There's no command to modify a foreign key constraint like that, but you
should be able to drop and re-add that single constraint using ALTER TABLE.
I don't see a reason to recreate the whole table...

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Modifying an existing constraint?
Следующее
От: Lynna Landstreet
Дата:
Сообщение: Re: ON DELETE CASCADE (was: Modifying an existing