File tree Expand file tree Collapse file tree 4 files changed +18
-39
lines changed Expand file tree Collapse file tree 4 files changed +18
-39
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,6 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
119119ERROR: Cannot cast type 'timetz' to 'interval'
120120SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
121121ERROR: 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-
128122SELECT 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";
146138SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
147139ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
148140 You will have to retype this query using an explicit cast
Original file line number Diff line number Diff line change @@ -119,12 +119,6 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
119119ERROR: Cannot cast type 'timetz' to 'interval'
120120SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
121121ERROR: 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-
128122SELECT 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";
146138SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
147139ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
148140 You will have to retype this query using an explicit cast
Original file line number Diff line number Diff line change @@ -119,12 +119,6 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
119119ERROR: Cannot cast type 'timetz' to 'interval'
120120SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
121121ERROR: 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-
128122SELECT 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";
146138SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
147139ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
148140 You will have to retype this query using an explicit cast
Original file line number Diff line number Diff line change @@ -54,13 +54,16 @@ SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
5454
5555SELECT 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-
5957SELECT time with time zone ' 01:30-08' - interval ' 02:01' AS " 23:29:00-08" ;
6058
6159SELECT 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
6568SELECT interval ' 04:30' - time with time zone ' 01:02' AS " +03:28" ;
6669
You can’t perform that action at this time.
0 commit comments