Re: Merging item codes using referential integrity - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Merging item codes using referential integrity
Date
Msg-id 20050328162311.GA70881@winnie.fuhr.org
Whole thread Raw
In response to Re: Merging item codes using referential integrity  (Thomas F.O'Connell <tfo@sitening.com>)
List pgsql-general
On Mon, Mar 28, 2005 at 09:41:03AM -0600, Thomas F.O'Connell wrote:

> I've only been explaining general database theory and the rules of SQL
> in response to your posts because I'm still having a difficult time
> understanding what you're trying to accomplish.

I think he's trying to exploit ON UPDATE CASCADE so he can execute
a single UPDATE on the referenced table instead of having to write
multiple UPDATE statements, one for each referencing table.  The
problem is that he's trying to change the referenced value from 2
to 1 but 1 already exists, so he gets a duplicate key error.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Richard_D_Levine@raytheon.com
Date:
Subject: US DoD FOSS Recommendation
Next
From: jian chen
Date:
Subject: sorting Chinese varchar field