Commit 617f9b7
committed
Tighten unit parsing in internal values
Interval values now generate an error when the user has multiple
consecutive units or a unit without a value. Previously, it was
possible to specify multiple units consecutively which is contrary to
what the documentation allows, so it was possible to finish with
confusing interval values.
This is a follow-up of the work done in 165d581.
Author: Joseph Koshakow
Reviewed-by: Jacob Champion, Gurjeet Singh, Reid Thompson
Discussion: https://postgr.es/m/CAAvxfHd-yNO+XYnUxL=GaNZ1n+eE0V-oE0+-cC1jdjdU0KS3iw@mail.gmail.com1 parent 165d581 commit 617f9b7
File tree
3 files changed
+25
-0
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3278 | 3278 | | |
3279 | 3279 | | |
3280 | 3280 | | |
| 3281 | + | |
3281 | 3282 | | |
3282 | 3283 | | |
3283 | 3284 | | |
| |||
3336 | 3337 | | |
3337 | 3338 | | |
3338 | 3339 | | |
| 3340 | + | |
3339 | 3341 | | |
3340 | 3342 | | |
3341 | 3343 | | |
| |||
3373 | 3375 | | |
3374 | 3376 | | |
3375 | 3377 | | |
| 3378 | + | |
3376 | 3379 | | |
3377 | 3380 | | |
3378 | 3381 | | |
| |||
3562 | 3565 | | |
3563 | 3566 | | |
3564 | 3567 | | |
| 3568 | + | |
3565 | 3569 | | |
3566 | 3570 | | |
3567 | 3571 | | |
3568 | 3572 | | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
3569 | 3576 | | |
3570 | 3577 | | |
3571 | 3578 | | |
| |||
3575 | 3582 | | |
3576 | 3583 | | |
3577 | 3584 | | |
| 3585 | + | |
3578 | 3586 | | |
3579 | 3587 | | |
3580 | 3588 | | |
| |||
3607 | 3615 | | |
3608 | 3616 | | |
3609 | 3617 | | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
3610 | 3622 | | |
3611 | 3623 | | |
3612 | 3624 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1796 | 1796 | | |
1797 | 1797 | | |
1798 | 1798 | | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
0 commit comments