Re: Article on MySQL vs. Postgres - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Article on MySQL vs. Postgres
Date
Msg-id 2961.962813790@sss.pgh.pa.us
Whole thread Raw
In response to Re: Article on MySQL vs. Postgres  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> There a bug report that allowed tuplicate ids in an uniqe field when 
> SELECT FOR UPDATE was used. Could this be your case ?
> [snip]
> IIRC the fix was also provided, so it could be fixed in current CVS (the
> above is from 7.0.2, worked the same in 6.5.3)

It does seem to be fixed in current CVS:

regression=#  create table test(i int primary key);
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'test_pkey' for table 'test'
CREATE
regression=# insert into test values(1);
INSERT 145215 1
regression=# begin;
BEGIN
regression=# select * from test for update;i
---1
(1 row)

regression=# insert into test values(1);
ERROR:  Cannot insert a duplicate key into unique index test_pkey
regression=#

        regards, tom lane


pgsql-hackers by date:

Previous
From: Sevo Stille
Date:
Subject: Re: Article on MySQL vs. Postgres
Next
From: Bruce Momjian
Date:
Subject: Re: fcntl(F_SETLK)