On 2019-05-22 21:21, Tom Lane wrote: > Peter Eisentraut <peter.eisentr...@2ndquadrant.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.
It's required by C99, and the configure test for C99 checks it. > 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. Another option is that in cases where it doesn't affect storage layouts, like the counting tuples case that started this thread, code could just use long long int directly instead of int64. Then if someone wants to make it 128 bits or 96 bits or whatever it would not be a problem. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services