X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AEAE0D1CCDC for ; Sat, 31 Jan 2004 17:42:10 +0000 (GMT) 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 84907-10 for ; Sat, 31 Jan 2004 13:42:06 -0400 (AST) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by svr1.postgresql.org (Postfix) with ESMTP id 1ADA9D1B860 for ; Sat, 31 Jan 2004 13:42:05 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1Amz88-000MMW-0W; Sat, 31 Jan 2004 17:42:04 +0000 Received: by mainbox.archonet.com (Postfix, from userid 529) id 4DB2716ABC; Sat, 31 Jan 2004 17:42:03 +0000 (GMT) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 4380F16887; Sat, 31 Jan 2004 17:42:01 +0000 (GMT) From: Richard Huxton To: beyaRecords - The home Urban music , pgsql-sql@postgresql.org Subject: Re: Mechanics of Update:Cascade Date: Sat, 31 Jan 2004 17:42:00 +0000 User-Agent: KMail/1.5 References: <3968B922-53DB-11D8-A6EB-0003938366A4@beya-records.com> In-Reply-To: <3968B922-53DB-11D8-A6EB-0003938366A4@beya-records.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401311742.00784.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/292 X-Sequence-Number: 16685 On Saturday 31 January 2004 10:50, beyaRecords - The home Urban music wrote: > Hi, > could someone please explain to me the mechanics of an UpDate:Cascade? > Delete:Cascade I fully understand but not Update. I have 2 tables A and > B. On B I have created a foreign key on user_id in both B and A for > Update and Delete cascade. If I delete from A it deletes all from B. If > I update A what happens in B? The column should be changed there too. For example, if we have B.user_id => A.user_id and change A.user_id from 100 to 200 then the same should happen in B too. -- Richard Huxton Archonet Ltd