mirror of https://github.com/postgres/postgres
Fix queries to insulate from daylight savings time.
This commit is contained in:
parent
57584d70fa
commit
c859ff92d0
|
@ -27,7 +27,7 @@ SELECT f1 AS "Time TZ" FROM TIMETZ_TBL;
|
|||
23:59:59.99-07
|
||||
(10 rows)
|
||||
|
||||
SELECT f1 AS "Three" FROM TIMETZ_TBL WHERE f1 < '05:06:07';
|
||||
SELECT f1 AS "Three" FROM TIMETZ_TBL WHERE f1 < '05:06:07-07';
|
||||
Three
|
||||
-------------
|
||||
00:01:00-07
|
||||
|
@ -35,7 +35,7 @@ SELECT f1 AS "Three" FROM TIMETZ_TBL WHERE f1 < '05:06:07';
|
|||
02:03:00-07
|
||||
(3 rows)
|
||||
|
||||
SELECT f1 AS "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07';
|
||||
SELECT f1 AS "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07-07';
|
||||
Seven
|
||||
----------------
|
||||
07:07:00-08
|
||||
|
@ -47,12 +47,12 @@ SELECT f1 AS "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07';
|
|||
23:59:59.99-07
|
||||
(7 rows)
|
||||
|
||||
SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00';
|
||||
SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00-07';
|
||||
None
|
||||
------
|
||||
(0 rows)
|
||||
|
||||
SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00';
|
||||
SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00-07';
|
||||
Ten
|
||||
----------------
|
||||
00:01:00-07
|
||||
|
|
|
@ -17,13 +17,13 @@ INSERT INTO TIMETZ_TBL VALUES ('11:59:59.99 PM PDT');
|
|||
|
||||
SELECT f1 AS "Time TZ" FROM TIMETZ_TBL;
|
||||
|
||||
SELECT f1 AS "Three" FROM TIMETZ_TBL WHERE f1 < '05:06:07';
|
||||
SELECT f1 AS "Three" FROM TIMETZ_TBL WHERE f1 < '05:06:07-07';
|
||||
|
||||
SELECT f1 AS "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07';
|
||||
SELECT f1 AS "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07-07';
|
||||
|
||||
SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00';
|
||||
SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00-07';
|
||||
|
||||
SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00';
|
||||
SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00-07';
|
||||
|
||||
--
|
||||
-- TIME simple math
|
||||
|
|
Loading…
Reference in New Issue