On Sat, Jan 30, 2016 at 7:36 AM, Michael Paquier
<michael.paqu...@gmail.com> wrote:
> On Fri, Jan 29, 2016 at 11:21 PM, Fabien COELHO <coe...@cri.ensmp.fr> wrote:
>> +            /* overflow check (needed for INT64_MIN) */
>> +            if (lval != 0 && (*retval < 0 == lval < 0))
>>
>> Why not use "if (lval == INT64_MIN)" instead of this complicated condition?
>> If it is really needed for some reason, I think that a comment could help.
>
> Checking for PG_INT64_MIN only would be fine as well, so let's do so.
> I thought honestly that we had better check if the result and the left
> argument are not of the same sign, but well.

Committed and back-patched to 9.5.  Doesn't apply further back.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to