adding on delete cascade constraint?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: postgresql <pgsql-general(at)postgresql(dot)org>
Subject: adding on delete cascade constraint?
Date: 2003-09-19 10:09:33
Message-ID: 3F6AD5DD.90706@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2003-09-19 10:38:00 Re: adding on delete cascade constraint?
Previous Message Paul Thomas 2003-09-19 09:59:04 Re: About Pgdump