From f051b87ace6dda42c191b77858c8d099af0de46a Mon Sep 17 00:00:00 2001 From: John Naylor Date: Fri, 30 Jul 2021 13:50:23 -0400 Subject: Fix range check in ECPG numeric to int conversion The previous coding guarded against -INT_MAX instead of INT_MIN, leading to -2147483648 being rejected as out of range. Per bug #17128 from Kevin Sweet Discussion: https://www.postgresql.org/message-id/flat/17128-55a8a879727a3e3a%40postgresql.org Reviewed-by: Tom Lane Backpatch to all supported branches --- doc/src/sgml/ecpg.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 9d5505cb849..04d4a6bdb2b 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -8881,7 +8881,7 @@ int dectoint(decimal *np, int *ip); Note that the ECPG implementation differs from the Informix implementation. Informix limits an integer to the range from -32767 to 32767, while the limits in the ECPG implementation depend on the - architecture (-INT_MAX .. INT_MAX). + architecture (INT_MIN .. INT_MAX). -- cgit v1.2.3