Skip site navigation (1) Skip section navigation (2)

Re: BUG #3910: Incorrect behavior of UPDATE statement ontables 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 ontables with constraints UNIQUE/PRIMARY KEY
Date: 2008-01-29 13:12:07
Message-ID: 20080129131207.GD5178@alvh.no-ip.org (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group