Re: Article on MySQL vs. Postgres
| От | Tom Lane |
|---|---|
| Тема | Re: Article on MySQL vs. Postgres |
| Дата | |
| Msg-id | 2961.962813790@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Article on MySQL vs. Postgres (Hannu Krosing <hannu@tm.ee>) |
| Список | 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 по дате отправления: