From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Missing PG_INT32_MIN in numutils.c |
Date: | 2016-04-13 07:49:36 |
Message-ID: | CAB7nPqTL0WFJ0b7xVHa5iPRWyNNJpFF1rr3gnY4sw1Jxabdt6g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
While going through numutils.c I found the following thing:
--- a/src/backend/utils/adt/numutils.c
+++ b/src/backend/utils/adt/numutils.c
@@ -136,7 +136,7 @@ pg_ltoa(int32 value, char *a)
* Avoid problems with the most negative integer not being representable
* as a positive integer.
*/
- if (value == (-2147483647 - 1))
+ if (value == PG_INT32_MIN)
{
memcpy(a, "-2147483648", 12);
return;
Attached is a patch. The interesting part is that pg_lltoa is not
missing the check on PG_INT64_MIN.
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
numutils-int32-min.patch | text/x-diff | 459 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-04-13 07:54:04 | Re: [COMMITTERS] pgsql: Add regression tests for multiple synchronous standbys. |
Previous Message | Michael Paquier | 2016-04-13 05:08:25 | Re: Optimization for updating foreign tables in Postgres FDW |