forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd8652ec
committed
Fix some incorrect parsing of time with time zone strings
When parsing a timetz string with a dynamic timezone abbreviation or atimezone not specified, it was possible to generate incorrect timestampsbased on a date which uses some non-initialized variables if the inputstring did not specify fully a date to parse. This is already checkedwhen a full timezone spec is included in the input string, but the twoother cases mentioned above missed the same checks.This gets fixed by generating an error as this input is invalid, or inshort when a date is not fully specified.Valgrind was complaining about this problem.Bug: #15910Author: Alexander LakhinDiscussion:https://postgr.es/m/15910-2eba5106b9aa0c61@postgresql.orgBackpatch-through: 9.41 parent2f76f41 commitd8652ec
File tree
3 files changed
+21
-0
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+21
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2280 | 2280 |
| |
2281 | 2281 |
| |
2282 | 2282 |
| |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
2283 | 2286 |
| |
2284 | 2287 |
| |
2285 | 2288 |
| |
| |||
2307 | 2310 |
| |
2308 | 2311 |
| |
2309 | 2312 |
| |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
2310 | 2316 |
| |
2311 | 2317 |
| |
2312 | 2318 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 |
| |
23 | 33 |
| |
24 | 34 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 |
| |
23 | 28 |
| |
24 | 29 |
| |
|
0 commit comments
Comments
(0)