forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit765f76d
committed
Fix is_digit labeling of to_timestamp's FFn format codes.
These format codes produce or consume strings of digits, so theyshould be labeled with is_digit = true, but they were not.This has effect in only one place, where is_next_separator()is checked to see if the preceding format code should slurp upall the available digits. Thus, with a format such as '...SSFF3'with remaining input '12345', the 'SS' code would consume allfive digits (and then complain about seconds being out of range)when it should eat only two digits.Per report from Nick Davies. This bug goes back tod589f94where the FFn codes were introduced, so back-patch to v13.Discussion:https://postgr.es/m/AM8PR08MB6356AC979252CFEA78B56678B6312@AM8PR08MB6356.eurprd08.prod.outlook.com1 parentc140c0f commit765f76d
File tree
3 files changed
+25
-13
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+25
-13
lines changedLines changed: 13 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
622 | 622 |
| |
623 | 623 |
| |
624 | 624 |
| |
625 |
| - | |
| 625 | + | |
626 | 626 |
| |
627 | 627 |
| |
628 | 628 |
| |
| |||
788 | 788 |
| |
789 | 789 |
| |
790 | 790 |
| |
791 |
| - | |
792 |
| - | |
793 |
| - | |
794 |
| - | |
795 |
| - | |
796 |
| - | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
797 | 797 |
| |
798 | 798 |
| |
799 | 799 |
| |
| |||
844 | 844 |
| |
845 | 845 |
| |
846 | 846 |
| |
847 |
| - | |
848 |
| - | |
849 |
| - | |
850 |
| - | |
851 |
| - | |
852 |
| - | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
853 | 853 |
| |
854 | 854 |
| |
855 | 855 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3453 | 3453 |
| |
3454 | 3454 |
| |
3455 | 3455 |
| |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
3456 | 3467 |
| |
3457 | 3468 |
| |
3458 | 3469 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
558 | 558 |
| |
559 | 559 |
| |
560 | 560 |
| |
| 561 | + | |
561 | 562 |
| |
562 | 563 |
| |
563 | 564 |
| |
|
0 commit comments
Comments
(0)