Re: Mechanics of Update:Cascade

From: Richard Huxton <dev(at)archonet(dot)com>
To: beyaRecords - The home Urban music <uzo(at)beya-records(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Mechanics of Update:Cascade
Date: 2004-01-31 17:42:00
Message-ID: 200401311742.00784.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2004-01-31 20:45:43 Re: Sometimes referential integrity seems not to work
Previous Message Stephan Szabo 2004-01-31 15:26:01 Re: Mechanics of Update:Cascade