Re: how to add "on delete cascade" to a foreign key constraint?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: A B <gentosaker(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to add "on delete cascade" to a foreign key constraint?
Date: 2010-08-18 16:24:07
Message-ID: 27660.1282148647@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

A B <gentosaker(at)gmail(dot)com> writes:
> I have a table with a foreign key constraint, how can I add "on delete
> cascade" to the foreign key?

You can't --- just drop the constraint and add a new one.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Jorge Alberto Fuentes Casillas 2010-08-18 16:56:25 Installing psqlodbc
Previous Message A B 2010-08-18 15:56:17 how to add "on delete cascade" to a foreign key constraint?