Update violating constraint

From: Naz Gassiep <naz(at)mira(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Update violating constraint
Date: 2007-05-03 04:01:16
Message-ID: 46395E8C.4020200@mira.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I'm trying to do an update on a table that has a unique constraint
on the field, I need to update the table by setting field = field+1
however if this does not perform the updates on the table in a proper
order (from last to first) then the update will cause a violation of the
index *during* the update even though the table would be consistent
after the update completes. So the update fails. How do I get around
this without removing the constraint?
- Naz.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-05-03 04:32:49 Re: Update violating constraint
Previous Message Islam Hegazy 2007-05-03 01:30:10 C functions under windows