File tree Expand file tree Collapse file tree 4 files changed +52
-2
lines changed Expand file tree Collapse file tree 4 files changed +52
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,21 @@ SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
135
135
-- which may be either -08 or -07 depending on the time of year.
136
136
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137
137
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
138
+ -- Try the following two tests instead, as a poor substitute
139
+ SELECT CAST(date 'today' + time with time zone '01:30'
140
+ + interval '02:01' AS time) AS "03:31:00";
141
+ 03:31:00
142
+ ----------
143
+ 03:31:00
144
+ (1 row)
145
+
146
+ SELECT CAST(date 'today' + time with time zone '03:30'
147
+ + interval '1 month 04:01' AS time) AS "07:31:00";
148
+ 07:31:00
149
+ ----------
150
+ 07:31:00
151
+ (1 row)
152
+
138
153
SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
139
154
ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
140
155
You will have to retype this query using an explicit cast
Original file line number Diff line number Diff line change @@ -135,6 +135,21 @@ SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
135
135
-- which may be either -08 or -07 depending on the time of year.
136
136
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137
137
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
138
+ -- Try the following two tests instead, as a poor substitute
139
+ SELECT CAST(date 'today' + time with time zone '01:30'
140
+ + interval '02:01' AS time) AS "03:31:00";
141
+ 03:31:00
142
+ ----------
143
+ 03:31:00
144
+ (1 row)
145
+
146
+ SELECT CAST(date 'today' + time with time zone '03:30'
147
+ + interval '1 month 04:01' AS time) AS "07:31:00";
148
+ 07:31:00
149
+ ----------
150
+ 07:31:00
151
+ (1 row)
152
+
138
153
SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
139
154
ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
140
155
You will have to retype this query using an explicit cast
Original file line number Diff line number Diff line change @@ -135,6 +135,21 @@ SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
135
135
-- which may be either -08 or -07 depending on the time of year.
136
136
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137
137
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
138
+ -- Try the following two tests instead, as a poor substitute
139
+ SELECT CAST(date 'today' + time with time zone '01:30'
140
+ + interval '02:01' AS time) AS "03:31:00";
141
+ 03:31:00
142
+ ----------
143
+ 03:31:00
144
+ (1 row)
145
+
146
+ SELECT CAST(date 'today' + time with time zone '03:30'
147
+ + interval '1 month 04:01' AS time) AS "07:31:00";
148
+ 07:31:00
149
+ ----------
150
+ 07:31:00
151
+ (1 row)
152
+
138
153
SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
139
154
ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
140
155
You will have to retype this query using an explicit cast
Original file line number Diff line number Diff line change @@ -60,10 +60,15 @@ SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
60
60
61
61
-- These two tests cannot be used because they default to current timezone,
62
62
-- which may be either -08 or -07 depending on the time of year.
63
-
64
63
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
65
-
66
64
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
65
+ -- Try the following two tests instead, as a poor substitute
66
+
67
+ SELECT CAST(date ' today' + time with time zone ' 01:30'
68
+ + interval ' 02:01' AS time ) AS " 03:31:00" ;
69
+
70
+ SELECT CAST(date ' today' + time with time zone ' 03:30'
71
+ + interval ' 1 month 04:01' AS time ) AS " 07:31:00" ;
67
72
68
73
SELECT interval ' 04:30' - time with time zone ' 01:02' AS " +03:28" ;
69
74
You can’t perform that action at this time.
0 commit comments