Re: viewing/altering the "ON DELETE CASCADE" constraint - Mailing list pgsql-general

From Stephan Szabo
Subject Re: viewing/altering the "ON DELETE CASCADE" constraint
Date
Msg-id 20020722103016.L14333-100000@megazone23.bigpanda.com
Whole thread Raw
In response to viewing/altering the "ON DELETE CASCADE" constraint  (Jon Lapham <lapham@extracta.com.br>)
List pgsql-general
On Mon, 22 Jul 2002, Jon Lapham wrote:

> Hello All-
>
> I'm sure this is a FAQ, but I cannot find anything in the docs that
> directly addresses this.
>
> How can I determine if a column 1) has a foreign key constraint, and 2)
> if that fkey constraint includes "ON DELETE CASCADE"?  I've tried the
> various "\d"-type commands in psql to no avail.
>
> Finally, assuming you have a column that *has* a fkey constraint, but
> not the additional "ON DELETE CASCADE" portion, how would you go about
> adding "ON DELETE CASCADE" to the column?

The best place to get info on this is at
http://techdocs.postgresql.org/

There are a few things on referential integrity there that I believe
describe how to get the info on the constraints.  As for changing
the constraint, you'll probably need to drop the constraint (dropping
the triggers) and then add it with alter table add constraint probably.


pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Windows - why not?
Next
From: "Thomas F. O'Connell"
Date:
Subject: simulating INSERT return values with default values of sequences