forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7aa81c6
committed
Fix precision handling for some COERCE_SQL_SYNTAX functions
f193883 has been incorrectly setting up the precision used in thetimestamp compilations returned by the following functions:- LOCALTIME- LOCALTIMESTAMP- CURRENT_TIME- CURRENT_TIMESTAMPSpecifying an out-of-range precision for CURRENT_TIMESTAMP andLOCALTIMESTAMP was raising a WARNING without adjusting the precision,leading to a subsequent error. LOCALTIME and CURRENT_TIME raised aWARNING without an error, still the precision given to the internalroutines was not correct, so let's be clean.Ian has reported the problems in timestamp.c, while I have noticed theones in date.c. Regression tests are added for all of them withprecisions high enough to provide coverage for the warnings, somethingthat went missing up to this commit.Author: Ian Lawrence Barwick, Michael PaquierDiscussion:https://postgr.es/m/CAB8KJ=jQEnn9sYG+N752spt68wMrhmT-ocHCh4oeNmHF82QMWA@mail.gmail.com1 parent1f605b8 commit7aa81c6
File tree
4 files changed
+40
-18
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+40
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 350 | + | |
354 | 351 | | |
355 | 352 | | |
356 | 353 | | |
| |||
375 | 372 | | |
376 | 373 | | |
377 | 374 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 375 | + | |
382 | 376 | | |
383 | 377 | | |
384 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1606 | 1606 | | |
1607 | 1607 | | |
1608 | 1608 | | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
| 1609 | + | |
1613 | 1610 | | |
1614 | 1611 | | |
1615 | 1612 | | |
| |||
1627 | 1624 | | |
1628 | 1625 | | |
1629 | 1626 | | |
1630 | | - | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
| 1627 | + | |
1634 | 1628 | | |
1635 | 1629 | | |
1636 | 1630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
60 | 89 | | |
61 | 90 | | |
62 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
0 commit comments
Comments
(0)