From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Petr Jelinek <petr(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: INT64_MIN and _MAX |
Date: | 2015-03-24 21:27:50 |
Message-ID: | 852327450.819250.1427232470366.JavaMail.yahoo@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:
> I didn't replace the 0xFFFFFFFF ones because most or all of them looked
> like basically bit-masking operations rather than actually dealing with
> the bounds of an unsigned int or uint32. I was specifically looking for
> places where literals were being used to represent maximum or minimum
> values.
Well, InvalidSerCommitSeqNo was initially defined to be UINT64_MAX
-- but some buildfarm members didn't know about that so it was
changed to UINT64CONST(0xFFFFFFFFFFFFFFFF). It is very much about
wanting the maximum value for uint64. As the comment says:
* - InvalidSerCommitSeqNo is used to indicate a transaction that
* hasn't committed yet, so use a number greater than all valid
* ones to make comparison do the expected thing
It does seem odd to only define *some* of these constants.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2015-03-24 21:55:47 | Re: Exposing PG_VERSION_NUM in pg_config |
Previous Message | Petr Jelinek | 2015-03-24 21:22:29 | Re: Replication identifiers, take 4 |