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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "long" type is not appropriate for counting tuples
Date: 2019-05-22 19:21:53
Message-ID: 9988.1558552913@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> Could we define int64 to be long long int on all platforms and just
> always use %lld?

Hmmm ... maybe. Once upon a time we had to cope with compilers
that didn't have "long long", but perhaps that time is past.

Another conceivable hazard is somebody deciding that the world
needs a platform where "long long" is 128 bits. I don't know
how likely that is to happen.

As a first step, we could try asking configure to compute
sizeof(long long) and seeing what the buildfarm makes of that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-22 19:27:18 Re: pgindent run next week?
Previous Message Akim Demaille 2019-05-22 19:20:31 Re: Remove useless associativity/precedence from parsers