pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Hanson <lists@pkhanson.com>
To: pgsql-sql@postgresql.org
Subject: Adding "on delete cascade" to all foreign key constraints
Date: Tue, 15 May 2007 12:19:54 -0500
Message-ID: <200705151219.54324.lists@pkhanson.com> (raw)

Hello,

I was wondering if there's a fast way I can add "on delete cascade" to all 
foreign key constraints in my database?  Maybe a quick update I can make 
against the catalog possibly? Or is there a way I can query for all foreign 
key constrains in the database and then I could write up a quick script to do 
the updates for me.

Any help is appreciated, TIA,

Pete Hanson




view thread (2+ messages)  latest in thread

Message-ID: <200705151219.54324.lists@pkhanson.com>
Permalink:  ../200705151219.54324.lists@pkhanson.com/
Also on:    postgresql.org/message-id/200705151219.54324.lists@pkhanson.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lists@pkhanson.com
  Subject: Re: Adding "on delete cascade" to all foreign key constraints
  In-Reply-To: <200705151219.54324.lists@pkhanson.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox