Re: Merging item codes using referential integrity

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Merging item codes using referential integrity
Дата
Msg-id 20050328162311.GA70881@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Merging item codes using referential integrity  (Thomas F.O'Connell <tfo@sitening.com>)
Список 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 по дате отправления:

Предыдущее
От: Richard_D_Levine@raytheon.com
Дата:
Сообщение: US DoD FOSS Recommendation
Следующее
От: jian chen
Дата:
Сообщение: sorting Chinese varchar field