From: | Lukas Kahwe Smith <smith(at)pooteeweet(dot)org> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Subject: | Re: Change request ... |
Date: | 2007-09-27 10:15:24 |
Message-ID: | 46FB82BC.2030906@pooteeweet.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Martijn van Oosterhout wrote:
> On Thu, Sep 27, 2007 at 02:48:52PM +0530, Anoo Sivadasan Pillai wrote:
>> Description : I have two tables with the same data , While I issue an
>> update command to increment the value of a unique field by 1, the
>> statement fails in one table and will succeed in the other table.
>> Following is the script to reproduce the behaviour.
>
> Correct. Unique constraints are not deferrable. I'm sure there are
> people who would like it fixed, but there is currently not even a
> proposal on how to do it. It's a hard problem, for which there are
> well-known work-arounds. In practice this problem don't come up too
> often.
>
> It's been on the TODO list for at least 5 years...
Wow, I was not aware of this limitation. MySQL hacks around this issue
by allowing an ORDER BY in UPDATE (and DELETE) statements.
regards,
Lukas
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2007-09-27 10:33:40 | Re: Change request ... |
Previous Message | Martijn van Oosterhout | 2007-09-27 09:44:36 | Re: Change request ... |