X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 39A53D1D2CC for ; Thu, 22 Apr 2004 23:59:27 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 22342-10 for ; Thu, 22 Apr 2004 23:59:25 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 06D08D1BACC for ; Thu, 22 Apr 2004 23:59:25 -0300 (ADT) Received: (qmail 1090 invoked by uid 500); 23 Apr 2004 03:03:27 -0000 Date: Thu, 22 Apr 2004 22:03:27 -0500 From: Bruno Wolff III To: Glenn MacGregor Cc: pgsql-admin@postgresql.org Subject: Re: Cascade delete question Message-ID: <20040423030327.GA828@wolff.to> Mail-Followup-To: Glenn MacGregor , pgsql-admin@postgresql.org References: <40882F27.2050900@highstreetnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40882F27.2050900@highstreetnetworks.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/300 X-Sequence-Number: 13273 On Thu, Apr 22, 2004 at 16:46:31 -0400, Glenn MacGregor wrote: > > No problem this works great! > > Now I have changed my data to > > vid vname parentname > 1 n1@test.com > 2 n2@test.com n1 > 3 n3@test.com n1 > 4 n4@test.com n1 > 5 n5@test.com n3 > > Can I change my delete cascade constraint to do this substring query > instead of an exact match? No. > Is there anyway to accomplish what I need to do? If the local part of the email address is a candidate key, separate it from the domain name and make it the primary key.