Re: BUG #3910: Incorrect behavior of UPDATE statement on tables with constraints UNIQUE/PRIMARY KEY

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Dmitry Afanasiev <KOT(at)MATPOCKuH(dot)Ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3910: Incorrect behavior of UPDATE statement on tables with constraints UNIQUE/PRIMARY KEY
Date: 2008-01-29 13:12:07
Message-ID: 20080129131207.GD5178@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dmitry Afanasiev wrote:

> Constraints must be checked AFTER updating ALL of rows, but really after
> every row.
> For illustrate try this simple sql script:
> CREATE TABLE n(n INTEGER PRIMARY KEY);
> INSERT INTO n VALUES(1);
> INSERT INTO n VALUES(2);
> INSERT INTO n VALUES(3);
> UPDATE n SET n = n + 1;

Yes. This is a known problem.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David JL Gradwell 2008-01-29 15:33:54 BUG #3897: plJava dll still doesn't load for 8.3RC2
Previous Message Gregory Stark 2008-01-29 11:08:36 Re: Bugs