Re: Article on MySQL vs. Postgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Tim Perdue <tperdue(at)valinux(dot)com>, The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)hub(dot)org
Subject: Re: Article on MySQL vs. Postgres
Date: 2000-07-05 16:16:30
Message-ID: 2961.962813790@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)tm(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2000-07-05 16:17:43 pgsql/src/backend/commands (command.c vacuum.c)
Previous Message Sevo Stille 2000-07-05 16:13:51 Re: Article on MySQL vs. Postgres