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

Commit71d578a

Browse files
committed
Remove daylight-savings-time-dependent tests of 'time with time zone'
datatype. Perhaps someday we can figure out a way of getting reproducibleresults from testing this type, but for now ...
1 parent41f166d commit71d578a

File tree

4 files changed

+18
-39
lines changed

4 files changed

+18
-39
lines changed

‎src/test/regress/expected/horology-no-DST-before-1970.out

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
119119
ERROR: Cannot cast type 'timetz' to 'interval'
120120
SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
121121
ERROR: Cannot cast type 'interval' to 'timetz'
122-
SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
123-
03:31:00-08
124-
-------------
125-
03:31:00-08
126-
(1 row)
127-
128122
SELECT time with time zone '01:30-08' - interval '02:01' AS "23:29:00-08";
129123
23:29:00-08
130124
-------------
@@ -137,12 +131,10 @@ SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
137131
14:31:00-08
138132
(1 row)
139133

140-
SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
141-
07:31:00-08
142-
-------------
143-
07:31:00-08
144-
(1 row)
145-
134+
-- These two tests cannot be used because they default to current timezone,
135+
-- which may be either -08 or -07 depending on the time of year.
136+
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137+
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
146138
SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
147139
ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
148140
You will have to retype this query using an explicit cast

‎src/test/regress/expected/horology-solaris-1947.out

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
119119
ERROR: Cannot cast type 'timetz' to 'interval'
120120
SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
121121
ERROR: Cannot cast type 'interval' to 'timetz'
122-
SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
123-
03:31:00-08
124-
-------------
125-
03:31:00-08
126-
(1 row)
127-
128122
SELECT time with time zone '01:30-08' - interval '02:01' AS "23:29:00-08";
129123
23:29:00-08
130124
-------------
@@ -137,12 +131,10 @@ SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
137131
14:31:00-08
138132
(1 row)
139133

140-
SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
141-
07:31:00-08
142-
-------------
143-
07:31:00-08
144-
(1 row)
145-
134+
-- These two tests cannot be used because they default to current timezone,
135+
-- which may be either -08 or -07 depending on the time of year.
136+
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137+
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
146138
SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
147139
ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
148140
You will have to retype this query using an explicit cast

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
119119
ERROR: Cannot cast type 'timetz' to 'interval'
120120
SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
121121
ERROR: Cannot cast type 'interval' to 'timetz'
122-
SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
123-
03:31:00-08
124-
-------------
125-
03:31:00-08
126-
(1 row)
127-
128122
SELECT time with time zone '01:30-08' - interval '02:01' AS "23:29:00-08";
129123
23:29:00-08
130124
-------------
@@ -137,12 +131,10 @@ SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
137131
14:31:00-08
138132
(1 row)
139133

140-
SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
141-
07:31:00-08
142-
-------------
143-
07:31:00-08
144-
(1 row)
145-
134+
-- These two tests cannot be used because they default to current timezone,
135+
-- which may be either -08 or -07 depending on the time of year.
136+
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137+
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
146138
SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
147139
ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
148140
You will have to retype this query using an explicit cast

‎src/test/regress/sql/horology.sql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
5454

5555
SELECT CAST(interval'02:03'AStime with time zone)AS"02:03:00-08";
5656

57-
SELECTtime with time zone'01:30'+ interval'02:01'AS"03:31:00-08";
58-
5957
SELECTtime with time zone'01:30-08'- interval'02:01'AS"23:29:00-08";
6058

6159
SELECTtime with time zone'02:30-08'+ interval'36:01'AS"14:31:00-08";
6260

63-
SELECTtime with time zone'03:30'+ interval'1 month 04:01'AS"07:31:00-08";
61+
-- These two tests cannot be used because they default to current timezone,
62+
-- which may be either -08 or -07 depending on the time of year.
63+
64+
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
65+
66+
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
6467

6568
SELECT interval'04:30'-time with time zone'01:02'AS"+03:28";
6669

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp