Re: "long" type is not appropriate for counting tuples

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "long" type is not appropriate for counting tuples
Date: 2019-04-29 18:28:34
Message-ID: CAH2-WzkriXhc1qiWoToho_ao1JkMCDLa7iMd=ZTCCYCFfOc6sw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 29, 2019 at 11:20 AM Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Agreed. Here's a patch. I see downthread that you also discovered the
> same mistake in _h_indexbuild by grepping for "long"; I got to it by
> examining callers of pgstat_progress_update_param and
> pgstat_progress_update_multi_param. I didn't find any other mistakes of
> the same ilk. Some codesites use "double" instead of "int64", but those
> are not broken.

This seems fine, though FWIW I probably would have gone with int64
instead of uint64. There is generally no downside to using int64, and
being to support negative integers can be useful in some contexts
(though not this context).

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-04-29 18:31:44 Re: "long" type is not appropriate for counting tuples
Previous Message Andres Freund 2019-04-29 18:24:23 Re: "long" type is not appropriate for counting tuples