Re: updating a row referenced by a foreign key

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: "Michael P(dot) Soulier" <michael_soulier(at)mitel(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: updating a row referenced by a foreign key
Date: 2008-05-18 14:57:28
Message-ID: 483043D8.7020103@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael P. Soulier wrote:

> Is there a simple way to update the row, and cascade the change to any
> and all rows referencing this row as a foreign key? I searched on
> cascade in the postgres docs and while I found references to deletion, I
> didn't find one for updates.

http://www.postgresql.org/docs/current/static/ddl-constraints.html#DDL-CONSTRAINTS-FK

"Analogous to ON DELETE there is also ON UPDATE which is invoked when a
referenced column is changed (updated). The possible actions are the same."

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2008-05-18 15:12:05 Re: tsearch2 on-demand dictionary loading & using functions in tsearch2
Previous Message Michael P. Soulier 2008-05-18 14:41:24 updating a row referenced by a foreign key