ecpg: Fix return code for overflow in numeric conversion
Daniel Gustafsson <dgustafsson@postgresql.org>
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
| Path | Change | +/− |
|---|---|---|
| src/interfaces/ecpg/compatlib/informix.c | modified | +8 −2 |
| src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout | modified | +6 −6 |
Discussion
- Potential issue in ecpg-informix decimal converting functions 12 messages · 2024-02-22 → 2024-03-25