Re: How to add "on delete cascade" constraints - Mailing list pgsql-general

From Alexander Farber
Subject Re: How to add "on delete cascade" constraints
Date
Msg-id CAADeyWjQ+jyyRLzcBh04wkdfY2zHD489+Lfr4aU8MYgc6Y=kxw@mail.gmail.com
Whole thread Raw
In response to Re: How to add "on delete cascade" constraints  (Richard Broersma <richard.broersma@gmail.com>)
List pgsql-general
Thank you - this has worked perfectly

On Fri, Apr 27, 2012 at 10:18 PM, Richard Broersma
<richard.broersma@gmail.com> wrote:
> You could, but you don't need to since you can do all of this is one statement:
>
> ALTER TABLE public.pref_scores
> DROP CONSTRAINT pref_scores_gid_fkey,
> ADD CONSTRAINT pref_scores_gid_fkey
>    FOREIGN KEY (gid)
>    REFERENCES pref_games(gid)
>    ON DELETE CASCADE;

pgsql-general by date:

Previous
From: Richard Broersma
Date:
Subject: Re: How to add "on delete cascade" constraints
Next
From: Josh Kupershmidt
Date:
Subject: Re: How to get the all the activities running during specific time range.Thanks!Plese help!