Cursor not getting all rows

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема Cursor not getting all rows
Дата
Msg-id 428A27A8.4040108@selectacast.net
обсуждение исходный текст
Ответы Re: Cursor not getting all rows  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: Cursor not getting all rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I'm running:

PostgreSQL 7.4.7 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2
20030222 (Red Hat Linux 3.2.2-5)


I do this:

BEGIN;
SELECT count(*) FROM u, d WHERE u.id = d.id AND ... ;
DECLARE cname CURSOR FOR SELECT u.field, d.field FROM u, d WHERE u.id =
d.id AND ... ;

At the end of the fetching if the number of fetched does not equal the
number from the SELECT count(*) I print out a warning message.  It
happens every once in a while.  Today it happened four times.

1) missed 1 out of 703773
2) missed 3 out of 703765
3) missed 10 out of 703743
4) missed 12 out of 703660

How is this possible?  Because they are in the same transaction the
count and the cursor should see the exact same data, right?

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

Предыдущее
От: "Kathy Boyle"
Дата:
Сообщение: initdb: failed
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Cursor not getting all rows