adding on delete cascade constraint?

Поиск
Список
Период
Сортировка
От Jean-Christian Imbeault
Тема adding on delete cascade constraint?
Дата
Msg-id 3F6AD5DD.90706@mega-bucks.co.jp
обсуждение исходный текст
Ответы Re: adding on delete cascade constraint?
Список pgsql-general
Currently I have a table defined as such:

TAL=# \d internal_keywords
Table "public.internal_keywords"
  Column  |  Type   | Modifiers
---------+---------+-----------
  keyword | text    | not null
  pid     | integer | not null
Indexes: internal_keywords_pkey primary key btree (keyword, pid)
Foreign Key constraints: $1 FOREIGN KEY (pid) REFERENCES products(id) ON
UPDATE NO ACTION ON DELETE NO ACTION

How can I change the ON DELETE action to CASCADE for column pid?

I've check the alter table documentation but cannot find any reference
to this.

Thanks,

Jean-Christian Imbeault


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