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";
135135-- which may be either -08 or -07 depending on the time of year.
136136-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137137-- 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+
138153SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
139154ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
140155 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";
135135-- which may be either -08 or -07 depending on the time of year.
136136-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137137-- 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+
138153SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
139154ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
140155 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";
135135-- which may be either -08 or -07 depending on the time of year.
136136-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
137137-- 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+
138153SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
139154ERROR: Unable to identify an operator '-' for types 'interval' and 'timetz'
140155 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";
6060
6161-- These two tests cannot be used because they default to current timezone,
6262-- which may be either -08 or -07 depending on the time of year.
63-
6463-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
65-
6664-- 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" ;
6772
6873SELECT interval ' 04:30' - time with time zone ' 01:02' AS " +03:28" ;
6974
You can’t perform that action at this time.
0 commit comments