mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Centralize definition of integer limits.
Several submitted and even committed patches have run into the problem that C89, our baseline, does not provide minimum/maximum values for various integer datatypes. C99's stdint.h does, but we can't rely on it. Several parts of the code defined limits locally, so instead centralize the definitions to c.h. This patch also changes the more obvious usages of literal limit values; there's more places that could be changed, but it's less clear whether it's beneficial to change those. Author: Andrew Gierth Discussion: 87619tc5wc.fsf@news-spur.riddles.org.uk
This commit is contained in:
@@ -33,7 +33,7 @@ typedef uint64 SerCommitSeqNo;
|
||||
* at that point. It's earlier than all normal sequence numbers,
|
||||
* and is only used by recovered prepared transactions
|
||||
*/
|
||||
#define InvalidSerCommitSeqNo ((SerCommitSeqNo) UINT64CONST(0xFFFFFFFFFFFFFFFF))
|
||||
#define InvalidSerCommitSeqNo ((SerCommitSeqNo) UINT64_MAX)
|
||||
#define RecoverySerCommitSeqNo ((SerCommitSeqNo) 1)
|
||||
#define FirstNormalSerCommitSeqNo ((SerCommitSeqNo) 2)
|
||||
|
||||
|
Reference in New Issue
Block a user