ecpg: Fix return code for overflow in numeric conversion
authorDaniel Gustafsson <[email protected]>
Mon, 25 Mar 2024 13:18:36 +0000 (14:18 +0100)
committerDaniel Gustafsson <[email protected]>
Mon, 25 Mar 2024 13:18:36 +0000 (14:18 +0100)
commitb2d6b4c728a282f9bbe9ff4fac02a872bef074dd
tree8c4c46e812ae82d50d4d32286c8cdcfcdefa699f
parent64e401b62b1559d617db5c1e1070d7a05e794c27
ecpg: Fix return code for overflow in numeric conversion

The decimal conversion functions dectoint and dectolong are documented
to return ECPG_INFORMIX_NUM_OVERFLOW in case of overflows, but always
returned -1 on all errors due to incorrectly checking the returnvalue
from the PGTYPES* functions.

Author: Aidar Imamov <[email protected]>
Discussion: https://postgr.es/m/54d2b53327516d9454daa5fb2f893bdc@postgrespro.ru
src/interfaces/ecpg/compatlib/informix.c
src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout