Re: ALTER TABLE -- how to add ON DELETE CASCADE?

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: ALTER TABLE -- how to add ON DELETE CASCADE?
Дата
Msg-id 8BAC97D6-8205-42C9-90C2-374E31B4DBAB@pervasive.com
обсуждение исходный текст
Ответ на Re: ALTER TABLE -- how to add ON DELETE CASCADE?  (felix@crowfix.com)
Ответы Re: ALTER TABLE -- how to add ON DELETE CASCADE?
Список pgsql-general
On Mar 7, 2006, at 4:42 PM, felix@crowfix.com wrote:

> On Tue, Mar 07, 2006 at 05:36:37PM -0500, Tom Lane wrote:
>> felix@crowfix.com writes:
>>>     ALTER TABLE A COLUMN AA ADD CONSTRAINT DELETE ON CASCADE
>>
>> You're missing the specification of the foreign key, not to mention
>> spelling the CASCADE clause backwards.  Try
>>
>> ALTER TABLE A ADD FOREIGN KEY(AA) REFERENCES B(BB) ON DELETE CASCADE
>
> Got it right in the Subject: and my many attempts, just not in the
> body :-)
>
> The column already had the foreign key, I never thought to add it
> again.  I was only thinking of modifying the minimum necessary.

Yeah, unfortunately there's no support for modifying constraints.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Tsearch2 cache lookup problem
Следующее
От: David Fetter
Дата:
Сообщение: Re: ALTER TABLE -- how to add ON DELETE CASCADE?