mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-12 14:08:47 +02:00
Add regression tests for circles, line segments, and paths. Modify regression tests to allow GEQ optimizer (order results).
535 lines
42 KiB
Plaintext
535 lines
42 KiB
Plaintext
QUERY: CREATE TABLE TEMP_DATETIME (f1 datetime);
|
|
QUERY: INSERT INTO TEMP_DATETIME (f1)
|
|
SELECT d1 FROM DATETIME_TBL
|
|
WHERE d1 BETWEEN '13-jun-1957' AND '1-jan-1997'
|
|
OR d1 BETWEEN '1-jan-1999' AND '1-jan-2010';
|
|
QUERY: SELECT '' AS ten, f1 AS datetime
|
|
FROM TEMP_DATETIME
|
|
ORDER BY datetime;
|
|
ten|datetime
|
|
---+-------------------------------
|
|
|epoch
|
|
|Wed Feb 28 17:32:01.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST
|
|
(10 rows)
|
|
|
|
QUERY: SELECT '' AS hundred, d.f1 AS datetime, t.f1 AS timespan, d.f1 + t.f1 AS plus
|
|
FROM TEMP_DATETIME d, TIMESPAN_TBL t
|
|
ORDER BY plus;
|
|
hundred|datetime |timespan |plus
|
|
-------+-------------------------------+-----------------------------+-------------------------------
|
|
|epoch |@ 14 secs ago |Wed Dec 31 15:59:46.00 1969 PST
|
|
|epoch |@ 1 min |Wed Dec 31 16:01:00.00 1969 PST
|
|
|epoch |@ 5 hours |Wed Dec 31 21:00:00.00 1969 PST
|
|
|epoch |@ 1 day 2 hours 3 mins 4 secs|Thu Jan 01 18:03:04.00 1970 PST
|
|
|epoch |@ 10 days |Sat Jan 10 16:00:00.00 1970 PST
|
|
|epoch |@ 3 mons |Tue Mar 31 16:00:00.00 1970 PST
|
|
|epoch |@ 5 mons |Sun May 31 17:00:00.00 1970 PDT
|
|
|epoch |@ 5 mons 12 hours |Mon Jun 01 05:00:00.00 1970 PDT
|
|
|epoch |@ 6 years |Wed Dec 31 16:00:00.00 1975 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 14 secs ago |Wed Feb 28 17:31:47.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 1 min |Wed Feb 28 17:33:01.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 5 hours |Wed Feb 28 22:32:01.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 14 secs ago |Thu Feb 29 17:31:47.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 1 min |Thu Feb 29 17:33:01.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Thu Feb 29 19:35:05.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 5 hours |Thu Feb 29 22:32:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 14 secs ago |Fri Mar 01 17:31:47.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 1 min |Fri Mar 01 17:33:01.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Fri Mar 01 19:35:05.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 5 hours |Fri Mar 01 22:32:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Sat Mar 02 19:35:05.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 10 days |Sat Mar 09 17:32:01.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 10 days |Sun Mar 10 17:32:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 10 days |Mon Mar 11 17:32:01.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 3 mons |Tue May 28 18:32:01.00 1996 PDT
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 3 mons |Fri May 31 18:32:01.00 1996 PDT
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 3 mons |Sat Jun 01 18:32:01.00 1996 PDT
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 5 mons |Sun Jul 28 18:32:01.00 1996 PDT
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 5 mons 12 hours |Mon Jul 29 06:32:01.00 1996 PDT
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 5 mons |Wed Jul 31 18:32:01.00 1996 PDT
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 5 mons 12 hours |Thu Aug 01 06:32:01.00 1996 PDT
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 5 mons |Thu Aug 01 18:32:01.00 1996 PDT
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 5 mons 12 hours |Fri Aug 02 06:32:01.00 1996 PDT
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 14 secs ago |Mon Dec 30 17:31:47.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 1 min |Mon Dec 30 17:33:01.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 5 hours |Mon Dec 30 22:32:01.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 14 secs ago |Tue Dec 31 17:31:47.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 1 min |Tue Dec 31 17:33:01.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Tue Dec 31 19:35:05.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 5 hours |Tue Dec 31 22:32:01.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Wed Jan 01 19:35:05.00 1997 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 10 days |Thu Jan 09 17:32:01.00 1997 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 10 days |Fri Jan 10 17:32:01.00 1997 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 3 mons |Sun Mar 30 17:32:01.00 1997 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 3 mons |Mon Mar 31 17:32:01.00 1997 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 5 mons |Fri May 30 18:32:01.00 1997 PDT
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 5 mons 12 hours |Sat May 31 06:32:01.00 1997 PDT
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 5 mons |Sat May 31 18:32:01.00 1997 PDT
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 5 mons 12 hours |Sun Jun 01 06:32:01.00 1997 PDT
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 14 secs ago |Fri Dec 31 17:31:47.00 1999 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 1 min |Fri Dec 31 17:33:01.00 1999 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 5 hours |Fri Dec 31 22:32:01.00 1999 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 14 secs ago |Sat Jan 01 17:31:47.00 2000 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 1 min |Sat Jan 01 17:33:01.00 2000 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 1 day 2 hours 3 mins 4 secs|Sat Jan 01 19:35:05.00 2000 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 5 hours |Sat Jan 01 22:32:01.00 2000 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 1 day 2 hours 3 mins 4 secs|Sun Jan 02 19:35:05.00 2000 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 10 days |Mon Jan 10 17:32:01.00 2000 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 10 days |Tue Jan 11 17:32:01.00 2000 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 3 mons |Fri Mar 31 17:32:01.00 2000 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 3 mons |Sat Apr 01 17:32:01.00 2000 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 5 mons |Wed May 31 18:32:01.00 2000 PDT
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 5 mons 12 hours |Thu Jun 01 06:32:01.00 2000 PDT
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 5 mons |Thu Jun 01 18:32:01.00 2000 PDT
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 5 mons 12 hours |Fri Jun 02 06:32:01.00 2000 PDT
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 14 secs ago |Sun Dec 31 17:31:47.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 1 min |Sun Dec 31 17:33:01.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 5 hours |Sun Dec 31 22:32:01.00 2000 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 14 secs ago |Mon Jan 01 17:31:47.00 2001 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 1 min |Mon Jan 01 17:33:01.00 2001 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 1 day 2 hours 3 mins 4 secs|Mon Jan 01 19:35:05.00 2001 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 5 hours |Mon Jan 01 22:32:01.00 2001 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 1 day 2 hours 3 mins 4 secs|Tue Jan 02 19:35:05.00 2001 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 10 days |Wed Jan 10 17:32:01.00 2001 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 10 days |Thu Jan 11 17:32:01.00 2001 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 3 mons |Sat Mar 31 17:32:01.00 2001 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 3 mons |Sun Apr 01 18:32:01.00 2001 PDT
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 5 mons |Thu May 31 18:32:01.00 2001 PDT
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 5 mons 12 hours |Fri Jun 01 06:32:01.00 2001 PDT
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 5 mons |Fri Jun 01 18:32:01.00 2001 PDT
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 5 mons 12 hours |Sat Jun 02 06:32:01.00 2001 PDT
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 6 years |Wed Feb 27 17:32:01.00 2002 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 6 years |Thu Feb 28 17:32:01.00 2002 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 6 years |Fri Mar 01 17:32:01.00 2002 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 6 years |Mon Dec 30 17:32:01.00 2002 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 6 years |Tue Dec 31 17:32:01.00 2002 PST
|
|
|epoch |@ 34 years |Wed Dec 31 16:00:00.00 2003 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 6 years |Sat Dec 31 17:32:01.00 2005 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 6 years |Sun Jan 01 17:32:01.00 2006 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 6 years |Sun Dec 31 17:32:01.00 2006 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 6 years |Mon Jan 01 17:32:01.00 2007 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 34 years |Wed Feb 27 17:32:01.00 2030 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 34 years |Thu Feb 28 17:32:01.00 2030 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 34 years |Fri Mar 01 17:32:01.00 2030 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 34 years |Mon Dec 30 17:32:01.00 2030 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 34 years |Tue Dec 31 17:32:01.00 2030 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 34 years |Sat Dec 31 17:32:01.00 2033 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 34 years |Sun Jan 01 17:32:01.00 2034 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 34 years |Sun Dec 31 17:32:01.00 2034 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 34 years |Mon Jan 01 17:32:01.00 2035 PST
|
|
(100 rows)
|
|
|
|
QUERY: SELECT '' AS hundred, d.f1 AS datetime, t.f1 AS timespan, d.f1 - t.f1 AS minus
|
|
FROM TEMP_DATETIME d, TIMESPAN_TBL t
|
|
WHERE isfinite(d.f1)
|
|
ORDER BY minus;
|
|
hundred|datetime |timespan |minus
|
|
-------+-------------------------------+-----------------------------+-------------------------------
|
|
|epoch |@ 34 years |Tue Dec 31 16:00:00.00 1935 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 34 years |Tue Feb 27 17:32:01.00 1962 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 34 years |Wed Feb 28 17:32:01.00 1962 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 34 years |Thu Mar 01 17:32:01.00 1962 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 34 years |Sun Dec 30 17:32:01.00 1962 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 34 years |Mon Dec 31 17:32:01.00 1962 PST
|
|
|epoch |@ 6 years |Tue Dec 31 16:00:00.00 1963 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 34 years |Fri Dec 31 17:32:01.00 1965 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 34 years |Sat Jan 01 17:32:01.00 1966 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 34 years |Sat Dec 31 17:32:01.00 1966 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 34 years |Sun Jan 01 17:32:01.00 1967 PST
|
|
|epoch |@ 5 mons 12 hours |Thu Jul 31 04:00:00.00 1969 PST
|
|
|epoch |@ 5 mons |Thu Jul 31 16:00:00.00 1969 PST
|
|
|epoch |@ 3 mons |Tue Sep 30 16:00:00.00 1969 PST
|
|
|epoch |@ 10 days |Sun Dec 21 16:00:00.00 1969 PST
|
|
|epoch |@ 1 day 2 hours 3 mins 4 secs|Tue Dec 30 13:56:56.00 1969 PST
|
|
|epoch |@ 5 hours |Wed Dec 31 11:00:00.00 1969 PST
|
|
|epoch |@ 1 min |Wed Dec 31 15:59:00.00 1969 PST
|
|
|epoch |@ 14 secs ago |Wed Dec 31 16:00:14.00 1969 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 6 years |Tue Feb 27 17:32:01.00 1990 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 6 years |Wed Feb 28 17:32:01.00 1990 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 6 years |Thu Mar 01 17:32:01.00 1990 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 6 years |Sun Dec 30 17:32:01.00 1990 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 6 years |Mon Dec 31 17:32:01.00 1990 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 6 years |Fri Dec 31 17:32:01.00 1993 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 6 years |Sat Jan 01 17:32:01.00 1994 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 6 years |Sat Dec 31 17:32:01.00 1994 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 6 years |Sun Jan 01 17:32:01.00 1995 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 5 mons 12 hours |Thu Sep 28 06:32:01.00 1995 PDT
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 5 mons |Thu Sep 28 18:32:01.00 1995 PDT
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 5 mons 12 hours |Sat Sep 30 06:32:01.00 1995 PDT
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 5 mons |Sat Sep 30 18:32:01.00 1995 PDT
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 5 mons 12 hours |Sun Oct 01 06:32:01.00 1995 PDT
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 5 mons |Sun Oct 01 18:32:01.00 1995 PDT
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 3 mons |Tue Nov 28 17:32:01.00 1995 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 3 mons |Thu Nov 30 17:32:01.00 1995 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 3 mons |Fri Dec 01 17:32:01.00 1995 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 10 days |Sun Feb 18 17:32:01.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 10 days |Mon Feb 19 17:32:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 10 days |Tue Feb 20 17:32:01.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Tue Feb 27 15:28:57.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 5 hours |Wed Feb 28 12:32:01.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Wed Feb 28 15:28:57.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 1 min |Wed Feb 28 17:31:01.00 1996 PST
|
|
|Wed Feb 28 17:32:01.00 1996 PST|@ 14 secs ago |Wed Feb 28 17:32:15.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 5 hours |Thu Feb 29 12:32:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Thu Feb 29 15:28:57.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 1 min |Thu Feb 29 17:31:01.00 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|@ 14 secs ago |Thu Feb 29 17:32:15.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 5 hours |Fri Mar 01 12:32:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 1 min |Fri Mar 01 17:31:01.00 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|@ 14 secs ago |Fri Mar 01 17:32:15.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 5 mons 12 hours |Tue Jul 30 06:32:01.00 1996 PDT
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 5 mons |Tue Jul 30 18:32:01.00 1996 PDT
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 5 mons 12 hours |Wed Jul 31 06:32:01.00 1996 PDT
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 5 mons |Wed Jul 31 18:32:01.00 1996 PDT
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 3 mons |Sun Sep 29 18:32:01.00 1996 PDT
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 3 mons |Mon Sep 30 18:32:01.00 1996 PDT
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 10 days |Fri Dec 20 17:32:01.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 10 days |Sat Dec 21 17:32:01.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Sun Dec 29 15:28:57.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 5 hours |Mon Dec 30 12:32:01.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 1 day 2 hours 3 mins 4 secs|Mon Dec 30 15:28:57.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 1 min |Mon Dec 30 17:31:01.00 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|@ 14 secs ago |Mon Dec 30 17:32:15.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 5 hours |Tue Dec 31 12:32:01.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 1 min |Tue Dec 31 17:31:01.00 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|@ 14 secs ago |Tue Dec 31 17:32:15.00 1996 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 5 mons 12 hours |Sat Jul 31 06:32:01.00 1999 PDT
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 5 mons |Sat Jul 31 18:32:01.00 1999 PDT
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 5 mons 12 hours |Sun Aug 01 06:32:01.00 1999 PDT
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 5 mons |Sun Aug 01 18:32:01.00 1999 PDT
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 3 mons |Thu Sep 30 18:32:01.00 1999 PDT
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 3 mons |Fri Oct 01 18:32:01.00 1999 PDT
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 10 days |Tue Dec 21 17:32:01.00 1999 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 10 days |Wed Dec 22 17:32:01.00 1999 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 1 day 2 hours 3 mins 4 secs|Thu Dec 30 15:28:57.00 1999 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 5 hours |Fri Dec 31 12:32:01.00 1999 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 1 day 2 hours 3 mins 4 secs|Fri Dec 31 15:28:57.00 1999 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 1 min |Fri Dec 31 17:31:01.00 1999 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|@ 14 secs ago |Fri Dec 31 17:32:15.00 1999 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 5 hours |Sat Jan 01 12:32:01.00 2000 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 1 min |Sat Jan 01 17:31:01.00 2000 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|@ 14 secs ago |Sat Jan 01 17:32:15.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 5 mons 12 hours |Mon Jul 31 06:32:01.00 2000 PDT
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 5 mons |Mon Jul 31 18:32:01.00 2000 PDT
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 5 mons 12 hours |Tue Aug 01 06:32:01.00 2000 PDT
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 5 mons |Tue Aug 01 18:32:01.00 2000 PDT
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 3 mons |Sat Sep 30 18:32:01.00 2000 PDT
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 3 mons |Sun Oct 01 18:32:01.00 2000 PDT
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 10 days |Thu Dec 21 17:32:01.00 2000 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 10 days |Fri Dec 22 17:32:01.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 1 day 2 hours 3 mins 4 secs|Sat Dec 30 15:28:57.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 5 hours |Sun Dec 31 12:32:01.00 2000 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 1 day 2 hours 3 mins 4 secs|Sun Dec 31 15:28:57.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 1 min |Sun Dec 31 17:31:01.00 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|@ 14 secs ago |Sun Dec 31 17:32:15.00 2000 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 5 hours |Mon Jan 01 12:32:01.00 2001 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 1 min |Mon Jan 01 17:31:01.00 2001 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|@ 14 secs ago |Mon Jan 01 17:32:15.00 2001 PST
|
|
(100 rows)
|
|
|
|
QUERY: SELECT '' AS ten, d.f1 AS datetime, '1980-01-06 00:00 GMT'::datetime AS gpstime_zero,
|
|
d.f1 - '1980-01-06 00:00 GMT'::datetime AS difference
|
|
FROM TEMP_DATETIME d
|
|
ORDER BY difference;
|
|
ten|datetime |gpstime_zero |difference
|
|
---+-------------------------------+-------------------------------+--------------------------------
|
|
|epoch |Sat Jan 05 16:00:00.00 1980 PST|@ 3657 days ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 5898 days 1 hour 32 mins 1 sec
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 5899 days 1 hour 32 mins 1 sec
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 5900 days 1 hour 32 mins 1 sec
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 6204 days 1 hour 32 mins 1 sec
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 6205 days 1 hour 32 mins 1 sec
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 7300 days 1 hour 32 mins 1 sec
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 7301 days 1 hour 32 mins 1 sec
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 7666 days 1 hour 32 mins 1 sec
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Sat Jan 05 16:00:00.00 1980 PST|@ 7667 days 1 hour 32 mins 1 sec
|
|
(10 rows)
|
|
|
|
QUERY: SELECT '' AS hundred, d1.f1 AS datetime1, d2.f1 AS datetime2, d1.f1 - d2.f1 AS difference
|
|
FROM TEMP_DATETIME d1, TEMP_DATETIME d2
|
|
ORDER BY datetime1, datetime2, difference;
|
|
hundred|datetime1 |datetime2 |difference
|
|
-------+-------------------------------+-------------------------------+-------------------------------------
|
|
|epoch |epoch |@ 0
|
|
|epoch |Wed Feb 28 17:32:01.00 1996 PST|@ 9555 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Thu Feb 29 17:32:01.00 1996 PST|@ 9556 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Fri Mar 01 17:32:01.00 1996 PST|@ 9557 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Mon Dec 30 17:32:01.00 1996 PST|@ 9861 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Tue Dec 31 17:32:01.00 1996 PST|@ 9862 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Fri Dec 31 17:32:01.00 1999 PST|@ 10957 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Sat Jan 01 17:32:01.00 2000 PST|@ 10958 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Sun Dec 31 17:32:01.00 2000 PST|@ 11323 days 1 hour 32 mins 1 sec ago
|
|
|epoch |Mon Jan 01 17:32:01.00 2001 PST|@ 11324 days 1 hour 32 mins 1 sec ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|epoch |@ 9555 days 1 hour 32 mins 1 sec
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 0
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 1 day ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 2 days ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 306 days ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 307 days ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 1402 days ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 1403 days ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 1768 days ago
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 1769 days ago
|
|
|Thu Feb 29 17:32:01.00 1996 PST|epoch |@ 9556 days 1 hour 32 mins 1 sec
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 1 day
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 0
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 1 day ago
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 305 days ago
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 306 days ago
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 1401 days ago
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 1402 days ago
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 1767 days ago
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 1768 days ago
|
|
|Fri Mar 01 17:32:01.00 1996 PST|epoch |@ 9557 days 1 hour 32 mins 1 sec
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 2 days
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 1 day
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 0
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 304 days ago
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 305 days ago
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 1400 days ago
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 1401 days ago
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 1766 days ago
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 1767 days ago
|
|
|Mon Dec 30 17:32:01.00 1996 PST|epoch |@ 9861 days 1 hour 32 mins 1 sec
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 306 days
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 305 days
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 304 days
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 0
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 1 day ago
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 1096 days ago
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 1097 days ago
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 1462 days ago
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 1463 days ago
|
|
|Tue Dec 31 17:32:01.00 1996 PST|epoch |@ 9862 days 1 hour 32 mins 1 sec
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 307 days
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 306 days
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 305 days
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 1 day
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 0
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 1095 days ago
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 1096 days ago
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 1461 days ago
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 1462 days ago
|
|
|Fri Dec 31 17:32:01.00 1999 PST|epoch |@ 10957 days 1 hour 32 mins 1 sec
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 1402 days
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 1401 days
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 1400 days
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 1096 days
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 1095 days
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 0
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 1 day ago
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 366 days ago
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 367 days ago
|
|
|Sat Jan 01 17:32:01.00 2000 PST|epoch |@ 10958 days 1 hour 32 mins 1 sec
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 1403 days
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 1402 days
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 1401 days
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 1097 days
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 1096 days
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 1 day
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 0
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 365 days ago
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 366 days ago
|
|
|Sun Dec 31 17:32:01.00 2000 PST|epoch |@ 11323 days 1 hour 32 mins 1 sec
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 1768 days
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 1767 days
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 1766 days
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 1462 days
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 1461 days
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 366 days
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 365 days
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 0
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 1 day ago
|
|
|Mon Jan 01 17:32:01.00 2001 PST|epoch |@ 11324 days 1 hour 32 mins 1 sec
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Wed Feb 28 17:32:01.00 1996 PST|@ 1769 days
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Thu Feb 29 17:32:01.00 1996 PST|@ 1768 days
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Fri Mar 01 17:32:01.00 1996 PST|@ 1767 days
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Mon Dec 30 17:32:01.00 1996 PST|@ 1463 days
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Tue Dec 31 17:32:01.00 1996 PST|@ 1462 days
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Fri Dec 31 17:32:01.00 1999 PST|@ 367 days
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Sat Jan 01 17:32:01.00 2000 PST|@ 366 days
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Sun Dec 31 17:32:01.00 2000 PST|@ 1 day
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Mon Jan 01 17:32:01.00 2001 PST|@ 0
|
|
(100 rows)
|
|
|
|
QUERY: SELECT '' as fifty, d1 as datetime,
|
|
date_part('year', d1) AS year, date_part('month', d1) AS month,
|
|
date_part('day',d1) AS day, date_part('hour', d1) AS hour,
|
|
date_part('minute', d1) AS minute, date_part('second', d1) AS second
|
|
FROM DATETIME_TBL
|
|
WHERE isfinite(d1) and d1 >= '1-jan-1900 GMT'
|
|
ORDER BY datetime;
|
|
fifty|datetime |year|month|day|hour|minute| second
|
|
-----+-------------------------------+----+-----+---+----+------+--------
|
|
|epoch |1969| 12| 31| 16| 0| 0
|
|
|Wed Feb 28 17:32:01.00 1996 PST|1996| 2| 28| 17| 32| 1
|
|
|Thu Feb 29 17:32:01.00 1996 PST|1996| 2| 29| 17| 32| 1
|
|
|Fri Mar 01 17:32:01.00 1996 PST|1996| 3| 1| 17| 32| 1
|
|
|Mon Dec 30 17:32:01.00 1996 PST|1996| 12| 30| 17| 32| 1
|
|
|Tue Dec 31 17:32:01.00 1996 PST|1996| 12| 31| 17| 32| 1
|
|
|Wed Jan 01 17:32:01.00 1997 PST|1997| 1| 1| 17| 32| 1
|
|
|Thu Jan 02 00:00:00.00 1997 PST|1997| 1| 2| 0| 0| 0
|
|
|Thu Jan 02 03:04:05.00 1997 PST|1997| 1| 2| 3| 4| 5
|
|
|Mon Feb 10 09:32:01.00 1997 PST|1997| 2| 10| 9| 32| 1
|
|
|Mon Feb 10 09:32:01.00 1997 PST|1997| 2| 10| 9| 32| 1
|
|
|Mon Feb 10 09:32:01.00 1997 PST|1997| 2| 10| 9| 32| 1
|
|
|Mon Feb 10 17:32:00.00 1997 PST|1997| 2| 10| 17| 32| 0
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32| 1
|
|
|Mon Feb 10 17:32:01.00 1997 PST|1997| 2| 10| 17| 32|1.000001
|
|
|Mon Feb 10 17:32:01.40 1997 PST|1997| 2| 10| 17| 32| 1.4
|
|
|Mon Feb 10 17:32:01.50 1997 PST|1997| 2| 10| 17| 32| 1.5
|
|
|Mon Feb 10 17:32:01.60 1997 PST|1997| 2| 10| 17| 32| 1.6
|
|
|Mon Feb 10 17:32:02.00 1997 PST|1997| 2| 10| 17| 32|1.999999
|
|
|Tue Feb 11 17:32:01.00 1997 PST|1997| 2| 11| 17| 32| 1
|
|
|Wed Feb 12 17:32:01.00 1997 PST|1997| 2| 12| 17| 32| 1
|
|
|Thu Feb 13 17:32:01.00 1997 PST|1997| 2| 13| 17| 32| 1
|
|
|Fri Feb 14 17:32:01.00 1997 PST|1997| 2| 14| 17| 32| 1
|
|
|Sat Feb 15 17:32:01.00 1997 PST|1997| 2| 15| 17| 32| 1
|
|
|Sun Feb 16 17:32:01.00 1997 PST|1997| 2| 16| 17| 32| 1
|
|
|Sun Feb 16 17:32:01.00 1997 PST|1997| 2| 16| 17| 32| 1
|
|
|Fri Feb 28 17:32:01.00 1997 PST|1997| 2| 28| 17| 32| 1
|
|
|Sat Mar 01 17:32:01.00 1997 PST|1997| 3| 1| 17| 32| 1
|
|
|Sat Mar 01 17:32:01.00 1997 PST|1997| 3| 1| 17| 32| 1
|
|
|Tue Jun 10 17:32:01.00 1997 PDT|1997| 6| 10| 17| 32| 1
|
|
|Tue Jun 10 18:32:01.00 1997 PDT|1997| 6| 10| 18| 32| 1
|
|
|Tue Dec 30 17:32:01.00 1997 PST|1997| 12| 30| 17| 32| 1
|
|
|Wed Dec 31 17:32:01.00 1997 PST|1997| 12| 31| 17| 32| 1
|
|
|Fri Dec 31 17:32:01.00 1999 PST|1999| 12| 31| 17| 32| 1
|
|
|Sat Jan 01 17:32:01.00 2000 PST|2000| 1| 1| 17| 32| 1
|
|
|Sun Dec 31 17:32:01.00 2000 PST|2000| 12| 31| 17| 32| 1
|
|
|Mon Jan 01 17:32:01.00 2001 PST|2001| 1| 1| 17| 32| 1
|
|
|Sat Feb 16 17:32:01.00 2097 |2097| 2| 16| 17| 32| 1
|
|
(50 rows)
|
|
|
|
QUERY: SELECT '' AS four, f1 AS abstime,
|
|
date_part('year', f1) AS year, date_part('month', f1) AS month,
|
|
date_part('day',f1) AS day, date_part('hour', f1) AS hour,
|
|
date_part('minute', f1) AS minute, date_part('second', f1) AS second
|
|
FROM ABSTIME_TBL
|
|
WHERE isfinite(f1) and f1 <> 'current'::abstime
|
|
ORDER BY abstime;
|
|
four|abstime |year|month|day|hour|minute|second
|
|
----+----------------------------+----+-----+---+----+------+------
|
|
|Mon May 10 23:59:12 1943 PST|1943| 5| 10| 23| 59| 12
|
|
|epoch |1969| 12| 31| 16| 0| 0
|
|
|Sun Jan 14 03:14:21 1973 PST|1973| 1| 14| 3| 14| 21
|
|
|Mon May 01 00:30:30 1995 PDT|1995| 5| 1| 0| 30| 30
|
|
(4 rows)
|
|
|
|
QUERY: SELECT '' AS ten, f1 AS datetime, date( f1) AS date
|
|
FROM TEMP_DATETIME
|
|
WHERE f1 <> 'current'::datetime
|
|
ORDER BY date;
|
|
ten|datetime | date
|
|
---+-------------------------------+----------
|
|
|Wed Feb 28 17:32:01.00 1996 PST|02-29-1996
|
|
|Thu Feb 29 17:32:01.00 1996 PST|03-01-1996
|
|
|Fri Mar 01 17:32:01.00 1996 PST|03-02-1996
|
|
|Mon Dec 30 17:32:01.00 1996 PST|12-31-1996
|
|
|Tue Dec 31 17:32:01.00 1996 PST|01-01-1997
|
|
|Fri Dec 31 17:32:01.00 1999 PST|01-01-2000
|
|
|epoch |01-01-2000
|
|
|Sat Jan 01 17:32:01.00 2000 PST|01-02-2000
|
|
|Sun Dec 31 17:32:01.00 2000 PST|01-01-2001
|
|
|Mon Jan 01 17:32:01.00 2001 PST|01-02-2001
|
|
(10 rows)
|
|
|
|
QUERY: SELECT '' AS ten, f1 AS datetime, abstime( f1) AS abstime
|
|
FROM TEMP_DATETIME
|
|
ORDER BY abstime;
|
|
ten|datetime |abstime
|
|
---+-------------------------------+----------------------------
|
|
|epoch |epoch
|
|
|Wed Feb 28 17:32:01.00 1996 PST|Wed Feb 28 17:32:01 1996 PST
|
|
|Thu Feb 29 17:32:01.00 1996 PST|Thu Feb 29 17:32:01 1996 PST
|
|
|Fri Mar 01 17:32:01.00 1996 PST|Fri Mar 01 17:32:01 1996 PST
|
|
|Mon Dec 30 17:32:01.00 1996 PST|Mon Dec 30 17:32:01 1996 PST
|
|
|Tue Dec 31 17:32:01.00 1996 PST|Tue Dec 31 17:32:01 1996 PST
|
|
|Fri Dec 31 17:32:01.00 1999 PST|Fri Dec 31 17:32:01 1999 PST
|
|
|Sat Jan 01 17:32:01.00 2000 PST|Sat Jan 01 17:32:01 2000 PST
|
|
|Sun Dec 31 17:32:01.00 2000 PST|Sun Dec 31 17:32:01 2000 PST
|
|
|Mon Jan 01 17:32:01.00 2001 PST|Mon Jan 01 17:32:01 2001 PST
|
|
(10 rows)
|
|
|
|
QUERY: SELECT '' AS five, f1 AS abstime, date( f1) AS date
|
|
FROM ABSTIME_TBL
|
|
WHERE isfinite(f1) AND f1 <> 'current'::abstime
|
|
ORDER BY date;
|
|
five|abstime | date
|
|
----+----------------------------+----------
|
|
|Mon May 10 23:59:12 1943 PST|05-10-1943
|
|
|epoch |01-01-1970
|
|
|Sun Jan 14 03:14:21 1973 PST|01-14-1973
|
|
|Mon May 01 00:30:30 1995 PDT|05-01-1995
|
|
(4 rows)
|
|
|
|
QUERY: SELECT '' AS five, d1 AS datetime, abstime(d1) AS abstime
|
|
FROM DATETIME_TBL WHERE NOT isfinite(d1);
|
|
five|datetime |abstime
|
|
----+---------+---------
|
|
|invalid |invalid
|
|
|-infinity|-infinity
|
|
|infinity |infinity
|
|
|invalid |invalid
|
|
|invalid |invalid
|
|
(5 rows)
|
|
|
|
QUERY: SELECT '' AS three, f1 as abstime, datetime(f1) AS datetime
|
|
FROM ABSTIME_TBL WHERE NOT isfinite(f1);
|
|
three|abstime |datetime
|
|
-----+---------+---------
|
|
|infinity |infinity
|
|
|-infinity|-infinity
|
|
|invalid |invalid
|
|
(3 rows)
|
|
|
|
QUERY: SELECT '' AS ten, f1 AS timespan, reltime( f1) AS reltime
|
|
FROM TIMESPAN_TBL;
|
|
ten|timespan |reltime
|
|
---+-----------------------------+----------------
|
|
|@ 1 min |@ 1 minute
|
|
|@ 5 hours |@ 5 hours
|
|
|@ 10 days |@ 10 days
|
|
|@ 34 years |@ 408 months
|
|
|@ 3 mons |@ 3 months
|
|
|@ 14 secs ago |@ 14 seconds ago
|
|
|@ 1 day 2 hours 3 mins 4 secs|@ 93784 seconds
|
|
|@ 6 years |@ 72 months
|
|
|@ 5 mons |@ 5 months
|
|
|@ 5 mons 12 hours |@ 3612 hours
|
|
(10 rows)
|
|
|
|
QUERY: SELECT '' AS six, f1 as reltime, timespan( f1) AS timespan
|
|
FROM RELTIME_TBL;
|
|
six|reltime |timespan
|
|
---+----------------+-------------
|
|
|@ 1 minute |@ 1 min
|
|
|@ 5 hours |@ 5 hours
|
|
|@ 10 days |@ 10 days
|
|
|@ 34 years |@ 12410 days
|
|
|@ 3 months |@ 90 days
|
|
|@ 14 seconds ago|@ 14 secs ago
|
|
(6 rows)
|
|
|
|
QUERY: DROP TABLE TEMP_DATETIME;
|