setup:
====
drop table if exists t1;
create table t1 (f1 int);
create unique index uix_t1 on t1(f1) ;
insert into t1(f1) values (1), (2), (3);
select * from t1;
f1
---
1
2
3
test statement:
============
update t1 set f1 = f1 + 1;
In PostgreSQL I got,
ERROR: duplicate key value violates unique constraint "uix_t1"
DETAIL: Key (f1)=(2) already exists.
I tried the same test statement in both SQL Server and Oracle
I got correct/expected results as below:
select * from t1;
f1
---
2
3
4
I thought the Atomic should be at statement level, could anyone tell me why
PostgreSQL behaves differently?
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Another-unexpected-behaviour-tp4610242p4610242.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.