Skip to content

Commit 71d578a

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 reproducible results from testing this type, but for now ...
1 parent 41f166d commit 71d578a

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' AS time with time zone) AS "02:03:00-08";
5656

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

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

63-
SELECT time 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy