Re: BUG #2306: Duplicate primary key

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: BUG #2306: Duplicate primary key
Дата
Msg-id 20060308203037.GA56586@winnie.fuhr.org
обсуждение исходный текст
Ответ на BUG #2306: Duplicate primary key  ("Andreas Jung" <lists@andreas-jung.com>)
Список pgsql-bugs
On Tue, Mar 07, 2006 at 04:43:18PM +0000, Andreas Jung wrote:
> PostgreSQL version: 7.4.9

7.4.12 is the latest in that branch; it contains several bug fixes
since 7.4.9.

> This gives me two rows with the same id=5077:
>
> Toolbox2Test=# select * from hierarchy where id >= 5077 order by id;

What's the output of the following command?

SELECT ctid, xmin, xmax, * FROM hierarchy WHERE id >= 5077 ORDER BY id;

> Search for all rows with id=5077 returns this:
>
> Toolbox2Test=# select * from hierarchy where id = 5077;
[...]
> (1 row)

Does the same query return different results depending on whether
you use an index scan or a sequential scan?  What do you get for
these queries?

SET enable_seqscan TO on;
SET enable_indexscan TO off;
SELECT ctid, xmin, xmax, * FROM hierarchy WHERE id >= 5077;
SELECT ctid, xmin, xmax, * FROM hierarchy WHERE id = 5077;

SET enable_seqscan TO off;
SET enable_indexscan TO on;
SELECT ctid, xmin, xmax, * FROM hierarchy WHERE id >= 5077;
SELECT ctid, xmin, xmax, * FROM hierarchy WHERE id = 5077;

--
Michael Fuhr

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Alexander Pivovarov"
Дата:
Сообщение: BUG #2304: Time zone bug: '05:04 GMT+3' processing as '05:04:00 -03'
Следующее
От: John R Pierce
Дата:
Сообщение: Re: BUG #2305: "No bufferspace available" error on large insert