Re: Mechanics of Update:Cascade - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Mechanics of Update:Cascade
Date
Msg-id 200401311742.00784.dev@archonet.com
Whole thread Raw
In response to Mechanics of Update:Cascade  (beyaRecords - The home Urban music <uzo@beya-records.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Mechanics of Update:Cascade
Next
From: "Enio Schutt Junior"
Date:
Subject: Sometimes referential integrity seems not to work