- Notifications
You must be signed in to change notification settings - Fork5.3k
Commitd03668e
committed
Switch some date/timestamp functions to use the soft error reporting
This commit changes some functions related to the data types date andtimestamp to use the soft error reporting rather than a custom booleanflag called "overflow", used to let the callers of these functions knowif an overflow happens.This results in the removal of some boilerplate code, as it is possibleto rely on an error context rather than a custom state, with thepossibility to use the error generated inside the functions updatedhere, if necessary.These functions were suffixed with "_opt_overflow". They are nowrenamed to use "_safe" as suffix.This work is similar to4246a97.Author: Amul Sul <sulamul@gmail.com>Reviewed-by: Amit Langote <amitlangote09@gmail.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Discussion:https://postgr.es/m/CAAJ_b95HEmFyzHZfsdPquSHeswcopk8MCG1Q_vn4tVkZ+xxofw@mail.gmail.com1 parent5424f4d commitd03668e
File tree
3 files changed
+96
-146
lines changed- contrib/btree_gin
- src
- backend/utils/adt
- include/utils
3 files changed
+96
-146
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
496 | 497 | | |
497 | 498 | | |
498 | 499 | | |
499 | | - | |
| 500 | + | |
500 | 501 | | |
501 | | - | |
502 | | - | |
| 502 | + | |
| 503 | + | |
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
| |||
530 | 531 | | |
531 | 532 | | |
532 | 533 | | |
| 534 | + | |
533 | 535 | | |
534 | | - | |
535 | 536 | | |
536 | | - | |
537 | | - | |
| 537 | + | |
| 538 | + | |
538 | 539 | | |
539 | 540 | | |
540 | 541 | | |
| |||
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
| 608 | + | |
607 | 609 | | |
608 | | - | |
609 | 610 | | |
610 | | - | |
611 | | - | |
| 611 | + | |
| 612 | + | |
612 | 613 | | |
613 | 614 | | |
614 | 615 | | |
615 | 616 | | |
616 | 617 | | |
617 | 618 | | |
618 | 619 | | |
| 620 | + | |
619 | 621 | | |
620 | | - | |
621 | 622 | | |
622 | | - | |
623 | | - | |
| 623 | + | |
| 624 | + | |
624 | 625 | | |
625 | 626 | | |
626 | 627 | | |
| |||
0 commit comments
Comments
(0)