Re: "long" type is not appropriate for counting tuples - Mailing list pgsql-hackers

From Tom Lane
Subject Re: "long" type is not appropriate for counting tuples
Date
Msg-id 12946.1562100961@sss.pgh.pa.us
Whole thread Raw
In response to Re: "long" type is not appropriate for counting tuples  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: "long" type is not appropriate for counting tuples  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> Attached is a patch to implement this in a handful of cases that are
> particularly verbose right now.  I think those are easy wins.
> (Also a second patch that makes use of %zu for size_t where this was not
> yet done.)

I took a look through these and see nothing objectionable.  There are
probably more places that can be improved, but we need not insist on
getting every such place in one go.

Per Robert's position that variables ought to have well-defined widths,
there might be something to be said for not touching the variable
declarations that you changed from int64 to long long, and instead
casting them to long long in the sprintf calls.  But I'm not really
convinced that that's better than what you've done.

Marked CF entry as ready-for-committer.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH v5] Show detailed table persistence in \dt+
Next
From: Tom Lane
Date:
Subject: Re: benchmarking Flex practices