From 171bf1cea579ce11bc7f0b2986f052022f2b6be1 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') diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 7266e229a47..84df3c3868c 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -8666,7 +8666,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