Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 3FF669FB77B for ; Tue, 15 May 2007 14:27:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 11244-10 for ; Tue, 15 May 2007 14:26:56 -0300 (ADT) X-Greylist: delayed 00:07:15.431339 by SQLgrey-1.7.4 Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by postgresql.org (Postfix) with ESMTP id 576A19FB4B5 for ; Tue, 15 May 2007 14:26:57 -0300 (ADT) Received: from zeus (unknown[12.206.139.159]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20070515171940m9200e20cje>; Tue, 15 May 2007 17:19:40 +0000 From: Peter Hanson Reply-To: 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 User-Agent: KMail/1.9.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705151219.54324.lists@pkhanson.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/133 X-Sequence-Number: 28413 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