Tighten unit parsing in internal values
Michael Paquier <michael@paquier.xyz>
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 165d581f146b. 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.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/datetime.c | modified | +12 −0 |
| src/test/regress/expected/interval.out | modified | +9 −0 |
| src/test/regress/sql/interval.sql | modified | +4 −0 |
Discussion
- DecodeInterval fixes 15 messages · 2023-04-10 → 2023-08-28