- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit67ffe19
committed
Improve tests of date_trunc() with infinity and unsupported units
Commitd85ce01 has added some new error handling code todate_trunc() of timestamp, timestamptz, and interval with infinitevalues.However, the new test cases added by that commit did not actually testall of the new code, missing coverage for the following cases:1) For timestamp without time zone:1-1) infinite value with valid unit1-2) infinite value with unsupported unit1-3) finite value with unsupported unit, for a code path older thand85ce01.2) For timestamp with time zone, without a time zone specified for thetruncation:2-1) infinite value with valid unit2-2) infinite value with unsupported unit2-3) finite value with unsupported unit, for a code path older thand85ce01.3) For timestamp with time zone, with a time zone specified for thetruncation:3-1) infinite value with valid unit.3-2) infinite value with unsupported unit.This commit also provides coverage for the bug fixed in2242b26,through cases 2-1) and 3-1), when using an infinite value with a validunit, with[out] the optional time zone parameter used for thetruncation.Author: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/2d320b6f-b4af-4fbc-9eec-5d0fa15d187b@eisentraut.orgDiscussion:https://postgr.es/m/4bf60a84-2862-4a53-acd5-8eddf134a60e@eisentraut.orgBackpatch-through: 181 parent074db86 commit67ffe19
File tree
4 files changed
+36
-3
lines changed- src/test/regress
- expected
- sql
4 files changed
+36
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
594 | 604 | | |
595 | 605 | | |
596 | 606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
763 | 773 | | |
764 | 774 | | |
765 | 775 | | |
| |||
780 | 790 | | |
781 | 791 | | |
782 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
783 | 801 | | |
784 | 802 | | |
785 | 803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | | - | |
228 | | - | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
0 commit comments
Comments
(0)