forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb2d6b4c
committed
ecpg: Fix return code for overflow in numeric conversion
The decimal conversion functions dectoint and dectolong are documentedto return ECPG_INFORMIX_NUM_OVERFLOW in case of overflows, but alwaysreturned -1 on all errors due to incorrectly checking the returnvaluefrom the PGTYPES* functions.Author: Aidar Imamov <a.imamov@postgrespro.ru>Discussion:https://postgr.es/m/54d2b53327516d9454daa5fb2f893bdc@postgrespro.ru1 parent64e401b commitb2d6b4c
File tree
2 files changed
+14
-8
lines changed- src/interfaces/ecpg
- compatlib
- test/expected
2 files changed
+14
-8
lines changedLines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
435 | 435 |
| |
436 | 436 |
| |
437 | 437 |
| |
| 438 | + | |
438 | 439 |
| |
439 | 440 |
| |
440 | 441 |
| |
| |||
445 | 446 |
| |
446 | 447 |
| |
447 | 448 |
| |
| 449 | + | |
448 | 450 |
| |
| 451 | + | |
449 | 452 |
| |
450 | 453 |
| |
451 |
| - | |
| 454 | + | |
452 | 455 |
| |
453 | 456 |
| |
454 | 457 |
| |
| |||
459 | 462 |
| |
460 | 463 |
| |
461 | 464 |
| |
| 465 | + | |
462 | 466 |
| |
463 | 467 |
| |
464 | 468 |
| |
| |||
469 | 473 |
| |
470 | 474 |
| |
471 | 475 |
| |
| 476 | + | |
472 | 477 |
| |
| 478 | + | |
473 | 479 |
| |
474 | 480 |
| |
475 |
| - | |
| 481 | + | |
476 | 482 |
| |
477 | 483 |
| |
478 | 484 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
7 |
| - | |
| 6 | + | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
49 |
| - | |
| 48 | + | |
| 49 | + | |
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
144 |
| - | |
145 |
| - | |
| 144 | + | |
| 145 | + | |
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
|
0 commit comments
Comments
(0)