ecpg: Fix return code for overflow in numeric conversion

Daniel Gustafsson <dgustafsson@postgresql.org>

Commit: b2d6b4c728a282f9bbe9ff4fac02a872bef074dd
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: 2024-03-25T13:18:36Z
Releases: 17.0
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 <a.imamov@postgrespro.ru>
Discussion: https://postgr.es/m/54d2b53327516d9454daa5fb2f893bdc@postgrespro.ru

Files

Discussion