Re: How Postgresql Compares For Query And Load Operations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mitch Vincent" <mvincent(at)cablespeed(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How Postgresql Compares For Query And Load Operations
Date: 2001-07-21 17:00:47
Message-ID: 9902.995734847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Mitch Vincent" <mvincent(at)cablespeed(dot)com> writes:
> What's the story with count(), are there overflow fears there too?

count() is just a plain int4 counter. Obviously it could overflow with
more than 2^31 rows, but we haven't yet had many (any?) complaints about
that, so I'm not in a big hurry to change it.

OTOH, if we decide it's OK for sum(int4) to work better on machines with
int8 support than on those without, maybe it'd make sense to change
count() to use int8 too.

>> Another consideration is what about machines without any 64-bit int
>> support. These machines would end up using a 32-bit int accumulator,
>> which would mean they'd be back to the pre-7.1 behavior in which sum()
>> could overflow. Is this okay?

> I wonder how many PG users this would affect..... Any idea?

A fairly small minority, I'm sure; but as usual, there's no way to know
just how many...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2001-07-21 17:02:46 Re: Language C - Console-based FrontEnd
Previous Message Roderick Scott Corporation 2001-07-21 15:49:36 Microsoft SQL Server Replication