Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4a071af

Browse files
committed
Stabilize timetz test across DST transitions.
The timetz test cases I added in commita963283 were unintentionallysensitive to whether or not DST is active in the PST8PDT time zone.Thus, they'll start failing this coming weekend, as reported byBernhard M. Wiedemann in bug #16689. Fortunately, DST-awareness isnot significant to the purpose of these test cases, so we can justforce them all to PDT (DST hours) to preserve stability of theresults.Back-patch to v10, as the prior patch was.Discussion:https://postgr.es/m/16689-57701daa23b377bf@postgresql.org
1 parentf90149e commit4a071af

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

‎src/test/regress/expected/timetz.out

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,45 +91,45 @@ SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00-07';
9191
(12 rows)
9292

9393
-- Check edge cases
94-
SELECT '23:59:59.999999'::timetz;
94+
SELECT '23:59:59.999999 PDT'::timetz;
9595
timetz
9696
--------------------
9797
23:59:59.999999-07
9898
(1 row)
9999

100-
SELECT '23:59:59.9999999'::timetz; -- rounds up
100+
SELECT '23:59:59.9999999 PDT'::timetz; -- rounds up
101101
timetz
102102
-------------
103103
24:00:00-07
104104
(1 row)
105105

106-
SELECT '23:59:60'::timetz; -- rounds up
106+
SELECT '23:59:60 PDT'::timetz; -- rounds up
107107
timetz
108108
-------------
109109
24:00:00-07
110110
(1 row)
111111

112-
SELECT '24:00:00'::timetz; -- allowed
112+
SELECT '24:00:00 PDT'::timetz; -- allowed
113113
timetz
114114
-------------
115115
24:00:00-07
116116
(1 row)
117117

118-
SELECT '24:00:00.01'::timetz; -- not allowed
119-
ERROR: date/time field value out of range: "24:00:00.01"
120-
LINE 1: SELECT '24:00:00.01'::timetz;
118+
SELECT '24:00:00.01 PDT'::timetz; -- not allowed
119+
ERROR: date/time field value out of range: "24:00:00.01 PDT"
120+
LINE 1: SELECT '24:00:00.01 PDT'::timetz;
121121
^
122-
SELECT '23:59:60.01'::timetz; -- not allowed
123-
ERROR: date/time field value out of range: "23:59:60.01"
124-
LINE 1: SELECT '23:59:60.01'::timetz;
122+
SELECT '23:59:60.01 PDT'::timetz; -- not allowed
123+
ERROR: date/time field value out of range: "23:59:60.01 PDT"
124+
LINE 1: SELECT '23:59:60.01 PDT'::timetz;
125125
^
126-
SELECT '24:01:00'::timetz; -- not allowed
127-
ERROR: date/time field value out of range: "24:01:00"
128-
LINE 1: SELECT '24:01:00'::timetz;
126+
SELECT '24:01:00 PDT'::timetz; -- not allowed
127+
ERROR: date/time field value out of range: "24:01:00 PDT"
128+
LINE 1: SELECT '24:01:00 PDT'::timetz;
129129
^
130-
SELECT '25:00:00'::timetz; -- not allowed
131-
ERROR: date/time field value out of range: "25:00:00"
132-
LINE 1: SELECT '25:00:00'::timetz;
130+
SELECT '25:00:00 PDT'::timetz; -- not allowed
131+
ERROR: date/time field value out of range: "25:00:00 PDT"
132+
LINE 1: SELECT '25:00:00 PDT'::timetz;
133133
^
134134
--
135135
-- TIME simple math

‎src/test/regress/sql/timetz.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00-07';
3636
SELECT f1AS"Ten"FROM TIMETZ_TBLWHERE f1>='00:00-07';
3737

3838
-- Check edge cases
39-
SELECT'23:59:59.999999'::timetz;
40-
SELECT'23:59:59.9999999'::timetz;-- rounds up
41-
SELECT'23:59:60'::timetz;-- rounds up
42-
SELECT'24:00:00'::timetz;-- allowed
43-
SELECT'24:00:00.01'::timetz;-- not allowed
44-
SELECT'23:59:60.01'::timetz;-- not allowed
45-
SELECT'24:01:00'::timetz;-- not allowed
46-
SELECT'25:00:00'::timetz;-- not allowed
39+
SELECT'23:59:59.999999 PDT'::timetz;
40+
SELECT'23:59:59.9999999 PDT'::timetz;-- rounds up
41+
SELECT'23:59:60 PDT'::timetz;-- rounds up
42+
SELECT'24:00:00 PDT'::timetz;-- allowed
43+
SELECT'24:00:00.01 PDT'::timetz;-- not allowed
44+
SELECT'23:59:60.01 PDT'::timetz;-- not allowed
45+
SELECT'24:01:00 PDT'::timetz;-- not allowed
46+
SELECT'25:00:00 PDT'::timetz;-- not allowed
4747

4848
--
4949
-- TIME simple math

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp