Re: [GENERAL] Insert result does not match record count

Поиск
Список
Период
Сортировка
Искать
От
Vik Fearing
Тема
Re: [GENERAL] Insert result does not match record count
Дата
Msg-id
51EFDED3.6060101@dalibo.com
Ответ на
Список
Дерево обсуждения
Re: [GENERAL] Insert result does not match record count Tom Lane <tgl@sss.pgh.pa.us>
Re: [GENERAL] Insert result does not match record count Andres Freund <andres@2ndquadrant.com>
Re: [GENERAL] Insert result does not match record count Bruce Momjian <bruce@momjian.us>
Re: [GENERAL] Insert result does not match record count Vik Fearing <vik.fearing@dalibo.com>
Re: [GENERAL] Insert result does not match record count Bruce Momjian <bruce@momjian.us>
Re: [GENERAL] Insert result does not match record count Tom Lane <tgl@sss.pgh.pa.us>
Re: [GENERAL] Insert result does not match record count Bruce Momjian <bruce@momjian.us>
Re: [GENERAL] Insert result does not match record count Vik Fearing <vik.fearing@dalibo.com>
Re: [GENERAL] Insert result does not match record count Bruce Momjian <bruce@momjian.us>
Re: [GENERAL] Insert result does not match record count Vik Fearing <vik.fearing@dalibo.com>
Re: [GENERAL] Insert result does not match record count Tom Lane <tgl@sss.pgh.pa.us>
Re: [GENERAL] Insert result does not match record count mark <dvlhntr@gmail.com>
Re: [GENERAL] Insert result does not match record count Tom Lane <tgl@sss.pgh.pa.us>
On 07/22/2013 06:20 PM, Jeff Janes wrote:
> On Fri, Jul 19, 2013 at 3:20 PM, Natalie Wenz  wrote:
>> Hi all,
>>
>> I am moving some data from one table to another in 9.2.4, and keep seeing this strange scenario:
>>
>> insert into newtable select data from oldtable where proc_date >= x and proc_date < y;
>>
>> INSERT 0 78551642
>>
>> select count(*) from newtable where proc_date >= x and proc_date < y;
>>    count
>> -----------
>>  4373518938
> It looks to me like the status report is 32 bits and overflowed.
>
> 4,373,518,938 - 2^32 = 78,551,642

Attached is a small patch that should fix the problem.

Vik
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Tom Lane
Дата:
FAQ