Markus Bertheau <twanger(at)bluetwanger(dot)de> writes:
>> + num_tuples = ceil(num_tuples + tuples_removed * 0.5);
> Not understanding a thing about the PG source code, and judging from the
> variable names, wouldn't you want ceil(num_tuples + (num_tuples -
> tuples_removed) * 0.5) instead?
No. num_tuples is post-removal. The full expression is
(num_tuples + (num_tuples + tuples_removed)) / 2
which simplifies as above.
regards, tom lane
In response to
pgsql-patches by date
|Next:||From: Korea PostgreSQL Users' Group||Date: 2004-12-06 16:18:41|
|Subject: Re: patch contrib/pgcrypto for win32 (2) - bug report|
|Previous:||From: laurie.burrow||Date: 2004-12-06 13:25:09|
|Subject: Reverse engineering problem on views|