-- daylight savings time right for times prior to Unix epoch (jan 1 1970).
--
CREATE TABLE ABSTIME_TBL (f1 abstime);
+BEGIN;
+INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'current');
+INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now');
+SELECT count(*) AS two FROM ABSTIME_TBL WHERE f1 = 'now' ;
+ two
+-----
+ 2
+(1 row)
+
+END;
+DELETE FROM ABSTIME_TBL;
INSERT INTO ABSTIME_TBL (f1) VALUES ('Jan 14, 1973 03:14:21');
--- was INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now'):
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'Mon May 1 00:30:30 1995');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'epoch');
-INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'current');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'infinity');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime '-infinity');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'May 10, 1947 23:59:12');
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
- | epoch
- | current
+ | Wed Dec 31 16:00:00 1969 PST
| infinity
| -infinity
| Sat May 10 23:59:12 1947 PST
| invalid
-(8 rows)
+(7 rows)
SELECT '' AS six, ABSTIME_TBL.*
WHERE ABSTIME_TBL.f1 < abstime 'Jun 30, 2001';
-----+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
| -infinity
| Sat May 10 23:59:12 1947 PST
(5 rows)
-----+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
- | epoch
- | current
+ | Wed Dec 31 16:00:00 1969 PST
| infinity
| Sat May 10 23:59:12 1947 PST
| invalid
-(7 rows)
+(6 rows)
SELECT '' AS six, ABSTIME_TBL.*
WHERE abstime 'May 10, 1947 23:59:12' <> ABSTIME_TBL.f1;
-----+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
- | epoch
- | current
+ | Wed Dec 31 16:00:00 1969 PST
| infinity
| -infinity
| invalid
-(7 rows)
-
-SELECT '' AS one, ABSTIME_TBL.*
- WHERE abstime 'current' = ABSTIME_TBL.f1;
- one | f1
------+---------
- | current
-(1 row)
+(6 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE abstime 'epoch' >= ABSTIME_TBL.f1;
three | f1
-------+------------------------------
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
| -infinity
| Sat May 10 23:59:12 1947 PST
(3 rows)
four | f1
------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
| -infinity
| Sat May 10 23:59:12 1947 PST
(4 rows)
------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
(3 rows)
SELECT '' AS four, f1 AS abstime,
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 <> abstime 'current'
+ WHERE isfinite(f1)
ORDER BY abstime;
four | abstime | year | month | day | hour | minute | second
------+------------------------------+------+-------+-----+------+--------+--------
| Sat May 10 23:59:12 1947 PST | 1947 | 5 | 10 | 23 | 59 | 12
- | epoch | 1969 | 12 | 31 | 16 | 0 | 0
+ | Wed Dec 31 16:00:00 1969 PST | 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)
| (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878049,-4.64390243902439)
| (10,10) | [(10,-10),(-3,-4)] | (2.39024390243902,-6.48780487804878)
| (0,0) | [(-1000000,200),(300000,-40)] | (0.0028402365895872,15.384614860264)
- | (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258202,15.3864610140472)
+ | (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258202,15.3864610140473)
| (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812267519,15.3851688427303)
| (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221496,15.3836744976925)
| (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420845634,15.3855375281616)
| (2.12132034355964,2.12132034355964),(-2.12132034355964,-2.12132034355964)
| (71.7106781186548,72.7106781186548),(-69.7106781186548,-68.7106781186548)
| (4.53553390593274,6.53553390593274),(-2.53553390593274,-0.535533905932738)
- | (3.12132034355964,4.12132034355964),(-1.12132034355964,-0.121320343559643)
+ | (3.12132034355964,4.12132034355964),(-1.12132034355964,-0.121320343559642)
| (107.071067811865,207.071067811865),(92.9289321881345,192.928932188135)
| (170.710678118655,70.7106781186548),(29.2893218813452,-70.7106781186548)
(6 rows)
FROM CIRCLE_TBL c1, POINT_TBL p1
WHERE (p1.f1 <-> c1.f1) > 0
ORDER BY distance, circle, point using <<;
- twentyfour | circle | point | distance
+ twentyfour | circle | point | distance
------------+----------------+------------+-------------------
- | <(100,0),100> | (5.1,34.5) | 0.976531926977964
- | <(1,2),3> | (-3,4) | 1.47213595499958
- | <(0,0),3> | (-3,4) | 2
+ | <(100,0),100> | (5.1,34.5) | 0.976531926977965
+ | <(1,2),3> | (-3,4) | 1.47213595499958
+ | <(0,0),3> | (-3,4) | 2
| <(100,0),100> | (-3,4) | 3.07764064044151
- | <(100,0),100> | (-5,-12) | 5.68348972285122
- | <(1,3),5> | (-10,0) | 6.40175425099138
- | <(1,3),5> | (10,10) | 6.40175425099138
- | <(0,0),3> | (-10,0) | 7
- | <(1,2),3> | (-10,0) | 8.18033988749895
- | <(1,2),3> | (10,10) | 9.0415945787923
- | <(0,0),3> | (-5,-12) | 10
- | <(100,0),100> | (-10,0) | 10
- | <(0,0),3> | (10,10) | 11.142135623731
- | <(1,3),5> | (-5,-12) | 11.1554944214035
- | <(1,2),3> | (-5,-12) | 12.2315462117278
- | <(1,3),5> | (5.1,34.5) | 26.7657047773224
- | <(1,2),3> | (5.1,34.5) | 29.757594539282
- | <(0,0),3> | (5.1,34.5) | 31.8749193547455
- | <(100,200),10> | (5.1,34.5) | 180.778038568384
- | <(100,200),10> | (10,10) | 200.237960416286
- | <(100,200),10> | (-3,4) | 211.415898254845
- | <(100,200),10> | (0,0) | 213.606797749979
- | <(100,200),10> | (-10,0) | 218.254244210267
- | <(100,200),10> | (-5,-12) | 226.577682802077
+ | <(100,0),100> | (-5,-12) | 5.68348972285122
+ | <(1,3),5> | (-10,0) | 6.40175425099138
+ | <(1,3),5> | (10,10) | 6.40175425099138
+ | <(0,0),3> | (-10,0) | 7
+ | <(1,2),3> | (-10,0) | 8.18033988749895
+ | <(1,2),3> | (10,10) | 9.0415945787923
+ | <(0,0),3> | (-5,-12) | 10
+ | <(100,0),100> | (-10,0) | 10
+ | <(0,0),3> | (10,10) | 11.142135623731
+ | <(1,3),5> | (-5,-12) | 11.1554944214035
+ | <(1,2),3> | (-5,-12) | 12.2315462117278
+ | <(1,3),5> | (5.1,34.5) | 26.7657047773223
+ | <(1,2),3> | (5.1,34.5) | 29.757594539282
+ | <(0,0),3> | (5.1,34.5) | 31.8749193547455
+ | <(100,200),10> | (5.1,34.5) | 180.778038568384
+ | <(100,200),10> | (10,10) | 200.237960416286
+ | <(100,200),10> | (-3,4) | 211.415898254845
+ | <(100,200),10> | (0,0) | 213.606797749979
+ | <(100,200),10> | (-10,0) | 218.254244210267
+ | <(100,200),10> | (-5,-12) | 226.577682802077
(24 rows)
--
-- HOROLOGY
--
+-- needed so tests pass even in Australia
+SET australian_timezones = 'off';
+SET DateStyle = 'Postgres,US';
--
-- date, time arithmetic
--
--- needed so tests pass
-SET australian_timezones = 'off';
SELECT date '1981-02-03' + time '04:05:06' AS "Date + Time";
- Date + Time
-------------------------------
- Tue Feb 03 04:05:06 1981 PST
+ Date + Time
+--------------------------
+ Tue Feb 03 04:05:06 1981
(1 row)
SELECT date '1991-02-03' + time with time zone '04:05:06 PST' AS "Date + Time PST";
Mon Dec 13 00:00:00 1999 PST
(1 row)
+-- subtract time from date should not make sense; use interval instead
SELECT date '1991-02-03' - time '04:05:06' AS "Subtract Time";
Subtract Time
------------------------------
--
-- timestamp, interval arithmetic
--
-SELECT timestamp '1996-03-01' - interval '1 second' AS "Feb 29";
+SELECT timestamp without time zone '1996-03-01' - interval '1 second' AS "Feb 29";
+ Feb 29
+--------------------------
+ Thu Feb 29 23:59:59 1996
+(1 row)
+
+SELECT timestamp without time zone '1999-03-01' - interval '1 second' AS "Feb 28";
+ Feb 28
+--------------------------
+ Sun Feb 28 23:59:59 1999
+(1 row)
+
+SELECT timestamp without time zone '2000-03-01' - interval '1 second' AS "Feb 29";
+ Feb 29
+--------------------------
+ Tue Feb 29 23:59:59 2000
+(1 row)
+
+SELECT timestamp without time zone '1999-12-01' + interval '1 month - 1 second' AS "Dec 31";
+ Dec 31
+--------------------------
+ Fri Dec 31 23:59:59 1999
+(1 row)
+
+-- Shorthand values
+-- Not directly usable for regression testing since these are not constants.
+-- So, just try to test parser and hope for the best - thomas 97/04/26
+SELECT (timestamp without time zone 'today' = (timestamp without time zone 'yesterday' + interval '1 day')) as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp without time zone 'today' = (timestamp without time zone 'tomorrow' - interval '1 day')) as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp without time zone 'tomorrow' = (timestamp without time zone 'yesterday' + interval '2 days')) as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp without time zone 'tomorrow' > 'now') as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT timestamp(date '1994-01-01', time '11:00') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+--------------------------
+ Sat Jan 01 11:00:00 1994
+(1 row)
+
+SELECT timestamp(date '1994-01-01', time '10:00') AS "Jan_01_1994_10am";
+ Jan_01_1994_10am
+--------------------------
+ Sat Jan 01 10:00:00 1994
+(1 row)
+
+SELECT timestamp(date '1994-01-01', time '11:00-5') AS "Jan_01_1994_8am";
+ERROR: Bad time external representation '11:00-5'
+SELECT timestamp(date '1994-01-01', time with time zone '11:00-5') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+--------------------------
+ Sat Jan 01 11:00:00 1994
+(1 row)
+
+SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMP_TBL;
+ 64 | one_year
+----+-----------------------------
+ | -infinity
+ | infinity
+ | Fri Jan 01 00:00:00 1971
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01.00 1998
+ | Tue Feb 10 17:32:02.00 1998
+ | Tue Feb 10 17:32:01.40 1998
+ | Tue Feb 10 17:32:01.50 1998
+ | Tue Feb 10 17:32:01.60 1998
+ | Fri Jan 02 00:00:00 1998
+ | Fri Jan 02 03:04:05 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Wed Jun 10 17:32:01 1998
+ | Sun Sep 22 18:19:20 2002
+ | Thu Mar 15 08:14:01 2001
+ | Thu Mar 15 13:14:02 2001
+ | Thu Mar 15 12:14:03 2001
+ | Thu Mar 15 03:14:04 2001
+ | Thu Mar 15 02:14:05 2001
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:00 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Wed Jun 10 18:32:01 1998
+ | Tue Feb 10 17:32:01 1998
+ | Wed Feb 11 17:32:01 1998
+ | Thu Feb 12 17:32:01 1998
+ | Fri Feb 13 17:32:01 1998
+ | Sat Feb 14 17:32:01 1998
+ | Sun Feb 15 17:32:01 1998
+ | Mon Feb 16 17:32:01 1998
+ | Thu Feb 16 17:32 0096 BC
+ | Sun Feb 16 17:32:01 0098
+ | Fri Feb 16 17:32:01 0598
+ | Wed Feb 16 17:32:01 1098
+ | Sun Feb 16 17:32:01 1698
+ | Fri Feb 16 17:32:01 1798
+ | Wed Feb 16 17:32:01 1898
+ | Mon Feb 16 17:32:01 1998
+ | Sun Feb 16 17:32:01 2098
+ | Fri Feb 28 17:32:01 1997
+ | Fri Feb 28 17:32:01 1997
+ | Sat Mar 01 17:32:01 1997
+ | Tue Dec 30 17:32:01 1997
+ | Wed Dec 31 17:32:01 1997
+ | Thu Jan 01 17:32:01 1998
+ | Sat Feb 28 17:32:01 1998
+ | Sun Mar 01 17:32:01 1998
+ | Wed Dec 30 17:32:01 1998
+ | Thu Dec 31 17:32:01 1998
+ | Sun Dec 31 17:32:01 2000
+ | Mon Jan 01 17:32:01 2001
+ | Mon Dec 31 17:32:01 2001
+ | Tue Jan 01 17:32:01 2002
+(64 rows)
+
+SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMP_TBL;
+ 64 | one_year
+----+-----------------------------
+ | -infinity
+ | infinity
+ | Wed Jan 01 00:00:00 1969
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01.00 1996
+ | Sat Feb 10 17:32:02.00 1996
+ | Sat Feb 10 17:32:01.40 1996
+ | Sat Feb 10 17:32:01.50 1996
+ | Sat Feb 10 17:32:01.60 1996
+ | Tue Jan 02 00:00:00 1996
+ | Tue Jan 02 03:04:05 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Mon Jun 10 17:32:01 1996
+ | Fri Sep 22 18:19:20 2000
+ | Mon Mar 15 08:14:01 1999
+ | Mon Mar 15 13:14:02 1999
+ | Mon Mar 15 12:14:03 1999
+ | Mon Mar 15 03:14:04 1999
+ | Mon Mar 15 02:14:05 1999
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:00 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Mon Jun 10 18:32:01 1996
+ | Sat Feb 10 17:32:01 1996
+ | Sun Feb 11 17:32:01 1996
+ | Mon Feb 12 17:32:01 1996
+ | Tue Feb 13 17:32:01 1996
+ | Wed Feb 14 17:32:01 1996
+ | Thu Feb 15 17:32:01 1996
+ | Fri Feb 16 17:32:01 1996
+ | Mon Feb 16 17:32 0098 BC
+ | Thu Feb 16 17:32:01 0096
+ | Tue Feb 16 17:32:01 0596
+ | Sun Feb 16 17:32:01 1096
+ | Thu Feb 16 17:32:01 1696
+ | Tue Feb 16 17:32:01 1796
+ | Sun Feb 16 17:32:01 1896
+ | Fri Feb 16 17:32:01 1996
+ | Thu Feb 16 17:32:01 2096
+ | Tue Feb 28 17:32:01 1995
+ | Tue Feb 28 17:32:01 1995
+ | Wed Mar 01 17:32:01 1995
+ | Sat Dec 30 17:32:01 1995
+ | Sun Dec 31 17:32:01 1995
+ | Mon Jan 01 17:32:01 1996
+ | Wed Feb 28 17:32:01 1996
+ | Fri Mar 01 17:32:01 1996
+ | Mon Dec 30 17:32:01 1996
+ | Tue Dec 31 17:32:01 1996
+ | Thu Dec 31 17:32:01 1998
+ | Fri Jan 01 17:32:01 1999
+ | Fri Dec 31 17:32:01 1999
+ | Sat Jan 01 17:32:01 2000
+(64 rows)
+
+SELECT timestamp with time zone '1996-03-01' - interval '1 second' AS "Feb 29";
Feb 29
------------------------------
Thu Feb 29 23:59:59 1996 PST
(1 row)
-SELECT timestamp '1999-03-01' - interval '1 second' AS "Feb 28";
+SELECT timestamp with time zone '1999-03-01' - interval '1 second' AS "Feb 28";
Feb 28
------------------------------
Sun Feb 28 23:59:59 1999 PST
(1 row)
-SELECT timestamp '2000-03-01' - interval '1 second' AS "Feb 29";
+SELECT timestamp with time zone '2000-03-01' - interval '1 second' AS "Feb 29";
Feb 29
------------------------------
Tue Feb 29 23:59:59 2000 PST
(1 row)
-SELECT timestamp '1999-12-01' + interval '1 month - 1 second' AS "Dec 31";
+SELECT timestamp with time zone '1999-12-01' + interval '1 month - 1 second' AS "Dec 31";
Dec 31
------------------------------
Fri Dec 31 23:59:59 1999 PST
(1 row)
+SELECT (timestamp with time zone 'today' = (timestamp with time zone 'yesterday' + interval '1 day')) as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp with time zone 'today' = (timestamp with time zone 'tomorrow' - interval '1 day')) as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp with time zone 'tomorrow' = (timestamp with time zone 'yesterday' + interval '2 days')) as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp with time zone 'tomorrow' > 'now') as "True";
+ True
+------
+ t
+(1 row)
+
+SELECT timestamptz(date '1994-01-01', time '11:00') AS "Jan_01_1994_10am";
+ Jan_01_1994_10am
+------------------------------
+ Sat Jan 01 11:00:00 1994 PST
+(1 row)
+
+SELECT timestamptz(date '1994-01-01', time '10:00') AS "Jan_01_1994_9am";
+ Jan_01_1994_9am
+------------------------------
+ Sat Jan 01 10:00:00 1994 PST
+(1 row)
+
+SELECT timestamptz(date '1994-01-01', time with time zone '11:00-8') AS "Jan_01_1994_11am";
+ Jan_01_1994_11am
+------------------------------
+ Sat Jan 01 11:00:00 1994 PST
+(1 row)
+
+SELECT timestamptz(date '1994-01-01', time with time zone '10:00-8') AS "Jan_01_1994_10am";
+ Jan_01_1994_10am
+------------------------------
+ Sat Jan 01 10:00:00 1994 PST
+(1 row)
+
+SELECT timestamptz(date '1994-01-01', time with time zone '11:00-5') AS "Jan_01_1994_8am";
+ Jan_01_1994_8am
+------------------------------
+ Sat Jan 01 08:00:00 1994 PST
+(1 row)
+
+SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
+ 64 | one_year
+----+---------------------------------
+ | -infinity
+ | infinity
+ | Thu Dec 31 16:00:00 1970 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01.00 1998 PST
+ | Tue Feb 10 17:32:02.00 1998 PST
+ | Tue Feb 10 17:32:01.40 1998 PST
+ | Tue Feb 10 17:32:01.50 1998 PST
+ | Tue Feb 10 17:32:01.60 1998 PST
+ | Fri Jan 02 00:00:00 1998 PST
+ | Fri Jan 02 03:04:05 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Wed Jun 10 17:32:01 1998 PDT
+ | Sun Sep 22 11:19:20 2002 PDT
+ | Thu Mar 15 08:14:01 2001 PST
+ | Thu Mar 15 04:14:02 2001 PST
+ | Thu Mar 15 02:14:03 2001 PST
+ | Thu Mar 15 03:14:04 2001 PST
+ | Thu Mar 15 01:14:05 2001 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:00 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 17:32:01 1998 PST
+ | Tue Feb 10 09:32:01 1998 PST
+ | Tue Feb 10 09:32:01 1998 PST
+ | Tue Feb 10 09:32:01 1998 PST
+ | Wed Jun 10 18:32:01 1998 PDT
+ | Tue Feb 10 17:32:01 1998 PST
+ | Wed Feb 11 17:32:01 1998 PST
+ | Thu Feb 12 17:32:01 1998 PST
+ | Fri Feb 13 17:32:01 1998 PST
+ | Sat Feb 14 17:32:01 1998 PST
+ | Sun Feb 15 17:32:01 1998 PST
+ | Mon Feb 16 17:32:01 1998 PST
+ | Thu Feb 16 17:32 0096 BC
+ | Sun Feb 16 17:32:01 0098
+ | Fri Feb 16 17:32:01 0598
+ | Wed Feb 16 17:32:01 1098
+ | Sun Feb 16 17:32:01 1698
+ | Fri Feb 16 17:32:01 1798
+ | Wed Feb 16 17:32:01 1898
+ | Mon Feb 16 17:32:01 1998 PST
+ | Sun Feb 16 17:32:01 2098
+ | Thu Feb 27 17:32:01 1997 PST
+ | Fri Feb 28 17:32:01 1997 PST
+ | Sat Mar 01 17:32:01 1997 PST
+ | Tue Dec 30 17:32:01 1997 PST
+ | Wed Dec 31 17:32:01 1997 PST
+ | Thu Jan 01 17:32:01 1998 PST
+ | Sat Feb 28 17:32:01 1998 PST
+ | Sun Mar 01 17:32:01 1998 PST
+ | Wed Dec 30 17:32:01 1998 PST
+ | Thu Dec 31 17:32:01 1998 PST
+ | Sun Dec 31 17:32:01 2000 PST
+ | Mon Jan 01 17:32:01 2001 PST
+ | Mon Dec 31 17:32:01 2001 PST
+ | Tue Jan 01 17:32:01 2002 PST
+(64 rows)
+
+SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
+ 64 | one_year
+----+---------------------------------
+ | -infinity
+ | infinity
+ | Tue Dec 31 16:00:00 1968 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01.00 1996 PST
+ | Sat Feb 10 17:32:02.00 1996 PST
+ | Sat Feb 10 17:32:01.40 1996 PST
+ | Sat Feb 10 17:32:01.50 1996 PST
+ | Sat Feb 10 17:32:01.60 1996 PST
+ | Tue Jan 02 00:00:00 1996 PST
+ | Tue Jan 02 03:04:05 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Mon Jun 10 17:32:01 1996 PDT
+ | Fri Sep 22 11:19:20 2000 PDT
+ | Mon Mar 15 08:14:01 1999 PST
+ | Mon Mar 15 04:14:02 1999 PST
+ | Mon Mar 15 02:14:03 1999 PST
+ | Mon Mar 15 03:14:04 1999 PST
+ | Mon Mar 15 01:14:05 1999 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:00 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sat Feb 10 09:32:01 1996 PST
+ | Sat Feb 10 09:32:01 1996 PST
+ | Sat Feb 10 09:32:01 1996 PST
+ | Mon Jun 10 18:32:01 1996 PDT
+ | Sat Feb 10 17:32:01 1996 PST
+ | Sun Feb 11 17:32:01 1996 PST
+ | Mon Feb 12 17:32:01 1996 PST
+ | Tue Feb 13 17:32:01 1996 PST
+ | Wed Feb 14 17:32:01 1996 PST
+ | Thu Feb 15 17:32:01 1996 PST
+ | Fri Feb 16 17:32:01 1996 PST
+ | Mon Feb 16 17:32 0098 BC
+ | Thu Feb 16 17:32:01 0096
+ | Tue Feb 16 17:32:01 0596
+ | Sun Feb 16 17:32:01 1096
+ | Thu Feb 16 17:32:01 1696
+ | Tue Feb 16 17:32:01 1796
+ | Sun Feb 16 17:32:01 1896
+ | Fri Feb 16 17:32:01 1996 PST
+ | Thu Feb 16 17:32:01 2096
+ | Mon Feb 27 17:32:01 1995 PST
+ | Tue Feb 28 17:32:01 1995 PST
+ | Wed Mar 01 17:32:01 1995 PST
+ | Sat Dec 30 17:32:01 1995 PST
+ | Sun Dec 31 17:32:01 1995 PST
+ | Mon Jan 01 17:32:01 1996 PST
+ | Thu Feb 29 17:32:01 1996 PST
+ | Fri Mar 01 17:32:01 1996 PST
+ | Mon Dec 30 17:32:01 1996 PST
+ | Tue Dec 31 17:32:01 1996 PST
+ | Thu Dec 31 17:32:01 1998 PST
+ | Fri Jan 01 17:32:01 1999 PST
+ | Fri Dec 31 17:32:01 1999 PST
+ | Sat Jan 01 17:32:01 2000 PST
+(64 rows)
+
--
-- time, interval arithmetic
--
07:31:00
(1 row)
-SELECT interval '04:30' - time '01:02' AS "+03:28";
- +03:28
--------------------
- @ 3 hours 28 mins
+SELECT interval '04:30' - time '01:02' AS "20:32:00";
+ 20:32:00
+----------
+ 20:32:00
(1 row)
SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
-- SELECT time with time zone '01:30' + interval '02:01' AS "03:31:00-08";
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
-- Try the following two tests instead, as a poor substitute
-SELECT CAST(date 'today' + time with time zone '01:30'
- + interval '02:01' AS time) AS "03:31:00";
+SELECT CAST(CAST(date 'today' + time with time zone '01:30'
+ + interval '02:01' AS time with time zone) AS time) AS "03:31:00";
03:31:00
----------
03:31:00
(1 row)
-SELECT CAST(date 'today' + time with time zone '03:30'
- + interval '1 month 04:01' AS time) AS "07:31:00";
+SELECT CAST(CAST(date 'today' + time with time zone '03:30'
+ + interval '1 month 04:01' AS time with time zone) AS time) AS "07:31:00";
07:31:00
----------
07:31:00
(1 row)
-SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
-ERROR: Unable to identify an operator '-' for types 'interval' and 'time with time zone'
- You will have to retype this query using an explicit cast
--- We get 100 rows when run in GMT...
+SELECT interval '04:30' - time with time zone '01:02-05' AS "20:32:00-05";
+ 20:32:00-05
+-------------
+ 20:32:00-05
+(1 row)
+
SELECT t.d1 + i.f1 AS "102" FROM TIMESTAMP_TBL t, INTERVAL_TBL i
WHERE t.d1 BETWEEN '1990-01-01' AND '2001-01-01'
AND i.f1 BETWEEN '00:00' AND '23:00';
- 102
----------------------------------
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01.00 1997 PST
- Mon Feb 10 22:32:01.00 1997 PST
- Mon Feb 10 17:33:02.00 1997 PST
- Mon Feb 10 22:32:02.00 1997 PST
- Mon Feb 10 17:33:01.40 1997 PST
- Mon Feb 10 22:32:01.40 1997 PST
- Mon Feb 10 17:33:01.50 1997 PST
- Mon Feb 10 22:32:01.50 1997 PST
- Mon Feb 10 17:33:01.60 1997 PST
- Mon Feb 10 22:32:01.60 1997 PST
- Thu Jan 02 00:01:00 1997 PST
- Thu Jan 02 05:00:00 1997 PST
- Thu Jan 02 03:05:05 1997 PST
- Thu Jan 02 08:04:05 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Tue Jun 10 17:33:01 1997 PDT
- Tue Jun 10 22:32:01 1997 PDT
- Wed Mar 15 08:15:01 2000 PST
- Wed Mar 15 13:14:01 2000 PST
- Wed Mar 15 04:15:02 2000 PST
- Wed Mar 15 09:14:02 2000 PST
- Wed Mar 15 02:15:03 2000 PST
- Wed Mar 15 07:14:03 2000 PST
- Wed Mar 15 03:15:04 2000 PST
- Wed Mar 15 08:14:04 2000 PST
- Wed Mar 15 01:15:05 2000 PST
- Wed Mar 15 06:14:05 2000 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:00 1997 PST
- Mon Feb 10 22:32:00 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Mon Feb 10 09:33:01 1997 PST
- Mon Feb 10 14:32:01 1997 PST
- Mon Feb 10 09:33:01 1997 PST
- Mon Feb 10 14:32:01 1997 PST
- Mon Feb 10 09:33:01 1997 PST
- Mon Feb 10 14:32:01 1997 PST
- Tue Jun 10 18:33:01 1997 PDT
- Tue Jun 10 23:32:01 1997 PDT
- Mon Feb 10 17:33:01 1997 PST
- Mon Feb 10 22:32:01 1997 PST
- Tue Feb 11 17:33:01 1997 PST
- Tue Feb 11 22:32:01 1997 PST
- Wed Feb 12 17:33:01 1997 PST
- Wed Feb 12 22:32:01 1997 PST
- Thu Feb 13 17:33:01 1997 PST
- Thu Feb 13 22:32:01 1997 PST
- Fri Feb 14 17:33:01 1997 PST
- Fri Feb 14 22:32:01 1997 PST
- Sat Feb 15 17:33:01 1997 PST
- Sat Feb 15 22:32:01 1997 PST
- Sun Feb 16 17:33:01 1997 PST
- Sun Feb 16 22:32:01 1997 PST
- Sun Feb 16 17:33:01 1997 PST
- Sun Feb 16 22:32:01 1997 PST
- Wed Feb 28 17:33:01 1996 PST
- Wed Feb 28 22:32:01 1996 PST
- Thu Feb 29 17:33:01 1996 PST
- Thu Feb 29 22:32:01 1996 PST
- Fri Mar 01 17:33:01 1996 PST
- Fri Mar 01 22:32:01 1996 PST
- Mon Dec 30 17:33:01 1996 PST
- Mon Dec 30 22:32:01 1996 PST
- Tue Dec 31 17:33:01 1996 PST
- Tue Dec 31 22:32:01 1996 PST
- Wed Jan 01 17:33:01 1997 PST
- Wed Jan 01 22:32:01 1997 PST
- Fri Feb 28 17:33:01 1997 PST
- Fri Feb 28 22:32:01 1997 PST
- Sat Mar 01 17:33:01 1997 PST
- Sat Mar 01 22:32:01 1997 PST
- Tue Dec 30 17:33:01 1997 PST
- Tue Dec 30 22:32:01 1997 PST
- Wed Dec 31 17:33:01 1997 PST
- Wed Dec 31 22:32:01 1997 PST
- Fri Dec 31 17:33:01 1999 PST
- Fri Dec 31 22:32:01 1999 PST
- Sat Jan 01 17:33:01 2000 PST
- Sat Jan 01 22:32:01 2000 PST
- Sun Dec 31 17:33:01 2000 PST
- Sun Dec 31 22:32:01 2000 PST
+ 102
+-----------------------------
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01.00 1997
+ Mon Feb 10 22:32:01.00 1997
+ Mon Feb 10 17:33:02.00 1997
+ Mon Feb 10 22:32:02.00 1997
+ Mon Feb 10 17:33:01.40 1997
+ Mon Feb 10 22:32:01.40 1997
+ Mon Feb 10 17:33:01.50 1997
+ Mon Feb 10 22:32:01.50 1997
+ Mon Feb 10 17:33:01.60 1997
+ Mon Feb 10 22:32:01.60 1997
+ Thu Jan 02 00:01:00 1997
+ Thu Jan 02 05:00:00 1997
+ Thu Jan 02 03:05:05 1997
+ Thu Jan 02 08:04:05 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Tue Jun 10 17:33:01 1997
+ Tue Jun 10 22:32:01 1997
+ Wed Mar 15 08:15:01 2000
+ Wed Mar 15 13:14:01 2000
+ Wed Mar 15 13:15:02 2000
+ Wed Mar 15 18:14:02 2000
+ Wed Mar 15 12:15:03 2000
+ Wed Mar 15 17:14:03 2000
+ Wed Mar 15 03:15:04 2000
+ Wed Mar 15 08:14:04 2000
+ Wed Mar 15 02:15:05 2000
+ Wed Mar 15 07:14:05 2000
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:00 1997
+ Mon Feb 10 22:32:00 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Tue Jun 10 18:33:01 1997
+ Tue Jun 10 23:32:01 1997
+ Mon Feb 10 17:33:01 1997
+ Mon Feb 10 22:32:01 1997
+ Tue Feb 11 17:33:01 1997
+ Tue Feb 11 22:32:01 1997
+ Wed Feb 12 17:33:01 1997
+ Wed Feb 12 22:32:01 1997
+ Thu Feb 13 17:33:01 1997
+ Thu Feb 13 22:32:01 1997
+ Fri Feb 14 17:33:01 1997
+ Fri Feb 14 22:32:01 1997
+ Sat Feb 15 17:33:01 1997
+ Sat Feb 15 22:32:01 1997
+ Sun Feb 16 17:33:01 1997
+ Sun Feb 16 22:32:01 1997
+ Sun Feb 16 17:33:01 1997
+ Sun Feb 16 22:32:01 1997
+ Wed Feb 28 17:33:01 1996
+ Wed Feb 28 22:32:01 1996
+ Thu Feb 29 17:33:01 1996
+ Thu Feb 29 22:32:01 1996
+ Fri Mar 01 17:33:01 1996
+ Fri Mar 01 22:32:01 1996
+ Mon Dec 30 17:33:01 1996
+ Mon Dec 30 22:32:01 1996
+ Tue Dec 31 17:33:01 1996
+ Tue Dec 31 22:32:01 1996
+ Wed Jan 01 17:33:01 1997
+ Wed Jan 01 22:32:01 1997
+ Fri Feb 28 17:33:01 1997
+ Fri Feb 28 22:32:01 1997
+ Sat Mar 01 17:33:01 1997
+ Sat Mar 01 22:32:01 1997
+ Tue Dec 30 17:33:01 1997
+ Tue Dec 30 22:32:01 1997
+ Wed Dec 31 17:33:01 1997
+ Wed Dec 31 22:32:01 1997
+ Fri Dec 31 17:33:01 1999
+ Fri Dec 31 22:32:01 1999
+ Sat Jan 01 17:33:01 2000
+ Sat Jan 01 22:32:01 2000
+ Sun Dec 31 17:33:01 2000
+ Sun Dec 31 22:32:01 2000
(102 rows)
SELECT t.d1 - i.f1 AS "102" FROM TIMESTAMP_TBL t, INTERVAL_TBL i
WHERE t.d1 BETWEEN '1990-01-01' AND '2001-01-01'
AND i.f1 BETWEEN '00:00' AND '23:00';
- 102
----------------------------------
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01.00 1997 PST
- Mon Feb 10 12:32:01.00 1997 PST
- Mon Feb 10 17:31:02.00 1997 PST
- Mon Feb 10 12:32:02.00 1997 PST
- Mon Feb 10 17:31:01.40 1997 PST
- Mon Feb 10 12:32:01.40 1997 PST
- Mon Feb 10 17:31:01.50 1997 PST
- Mon Feb 10 12:32:01.50 1997 PST
- Mon Feb 10 17:31:01.60 1997 PST
- Mon Feb 10 12:32:01.60 1997 PST
- Wed Jan 01 23:59:00 1997 PST
- Wed Jan 01 19:00:00 1997 PST
- Thu Jan 02 03:03:05 1997 PST
- Wed Jan 01 22:04:05 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Tue Jun 10 17:31:01 1997 PDT
- Tue Jun 10 12:32:01 1997 PDT
- Wed Mar 15 08:13:01 2000 PST
- Wed Mar 15 03:14:01 2000 PST
- Wed Mar 15 04:13:02 2000 PST
- Tue Mar 14 23:14:02 2000 PST
- Wed Mar 15 02:13:03 2000 PST
- Tue Mar 14 21:14:03 2000 PST
- Wed Mar 15 03:13:04 2000 PST
- Tue Mar 14 22:14:04 2000 PST
- Wed Mar 15 01:13:05 2000 PST
- Tue Mar 14 20:14:05 2000 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:00 1997 PST
- Mon Feb 10 12:32:00 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Mon Feb 10 09:31:01 1997 PST
- Mon Feb 10 04:32:01 1997 PST
- Mon Feb 10 09:31:01 1997 PST
- Mon Feb 10 04:32:01 1997 PST
- Mon Feb 10 09:31:01 1997 PST
- Mon Feb 10 04:32:01 1997 PST
- Tue Jun 10 18:31:01 1997 PDT
- Tue Jun 10 13:32:01 1997 PDT
- Mon Feb 10 17:31:01 1997 PST
- Mon Feb 10 12:32:01 1997 PST
- Tue Feb 11 17:31:01 1997 PST
- Tue Feb 11 12:32:01 1997 PST
- Wed Feb 12 17:31:01 1997 PST
- Wed Feb 12 12:32:01 1997 PST
- Thu Feb 13 17:31:01 1997 PST
- Thu Feb 13 12:32:01 1997 PST
- Fri Feb 14 17:31:01 1997 PST
- Fri Feb 14 12:32:01 1997 PST
- Sat Feb 15 17:31:01 1997 PST
- Sat Feb 15 12:32:01 1997 PST
- Sun Feb 16 17:31:01 1997 PST
- Sun Feb 16 12:32:01 1997 PST
- Sun Feb 16 17:31:01 1997 PST
- Sun Feb 16 12:32:01 1997 PST
- Wed Feb 28 17:31:01 1996 PST
- Wed Feb 28 12:32:01 1996 PST
- Thu Feb 29 17:31:01 1996 PST
- Thu Feb 29 12:32:01 1996 PST
- Fri Mar 01 17:31:01 1996 PST
- Fri Mar 01 12:32:01 1996 PST
- Mon Dec 30 17:31:01 1996 PST
- Mon Dec 30 12:32:01 1996 PST
- Tue Dec 31 17:31:01 1996 PST
- Tue Dec 31 12:32:01 1996 PST
- Wed Jan 01 17:31:01 1997 PST
- Wed Jan 01 12:32:01 1997 PST
- Fri Feb 28 17:31:01 1997 PST
- Fri Feb 28 12:32:01 1997 PST
- Sat Mar 01 17:31:01 1997 PST
- Sat Mar 01 12:32:01 1997 PST
- Tue Dec 30 17:31:01 1997 PST
- Tue Dec 30 12:32:01 1997 PST
- Wed Dec 31 17:31:01 1997 PST
- Wed Dec 31 12:32:01 1997 PST
- Fri Dec 31 17:31:01 1999 PST
- Fri Dec 31 12:32:01 1999 PST
- Sat Jan 01 17:31:01 2000 PST
- Sat Jan 01 12:32:01 2000 PST
- Sun Dec 31 17:31:01 2000 PST
- Sun Dec 31 12:32:01 2000 PST
+ 102
+-----------------------------
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01.00 1997
+ Mon Feb 10 12:32:01.00 1997
+ Mon Feb 10 17:31:02.00 1997
+ Mon Feb 10 12:32:02.00 1997
+ Mon Feb 10 17:31:01.40 1997
+ Mon Feb 10 12:32:01.40 1997
+ Mon Feb 10 17:31:01.50 1997
+ Mon Feb 10 12:32:01.50 1997
+ Mon Feb 10 17:31:01.60 1997
+ Mon Feb 10 12:32:01.60 1997
+ Wed Jan 01 23:59:00 1997
+ Wed Jan 01 19:00:00 1997
+ Thu Jan 02 03:03:05 1997
+ Wed Jan 01 22:04:05 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Tue Jun 10 17:31:01 1997
+ Tue Jun 10 12:32:01 1997
+ Wed Mar 15 08:13:01 2000
+ Wed Mar 15 03:14:01 2000
+ Wed Mar 15 13:13:02 2000
+ Wed Mar 15 08:14:02 2000
+ Wed Mar 15 12:13:03 2000
+ Wed Mar 15 07:14:03 2000
+ Wed Mar 15 03:13:04 2000
+ Tue Mar 14 22:14:04 2000
+ Wed Mar 15 02:13:05 2000
+ Tue Mar 14 21:14:05 2000
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:00 1997
+ Mon Feb 10 12:32:00 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Tue Jun 10 18:31:01 1997
+ Tue Jun 10 13:32:01 1997
+ Mon Feb 10 17:31:01 1997
+ Mon Feb 10 12:32:01 1997
+ Tue Feb 11 17:31:01 1997
+ Tue Feb 11 12:32:01 1997
+ Wed Feb 12 17:31:01 1997
+ Wed Feb 12 12:32:01 1997
+ Thu Feb 13 17:31:01 1997
+ Thu Feb 13 12:32:01 1997
+ Fri Feb 14 17:31:01 1997
+ Fri Feb 14 12:32:01 1997
+ Sat Feb 15 17:31:01 1997
+ Sat Feb 15 12:32:01 1997
+ Sun Feb 16 17:31:01 1997
+ Sun Feb 16 12:32:01 1997
+ Sun Feb 16 17:31:01 1997
+ Sun Feb 16 12:32:01 1997
+ Wed Feb 28 17:31:01 1996
+ Wed Feb 28 12:32:01 1996
+ Thu Feb 29 17:31:01 1996
+ Thu Feb 29 12:32:01 1996
+ Fri Mar 01 17:31:01 1996
+ Fri Mar 01 12:32:01 1996
+ Mon Dec 30 17:31:01 1996
+ Mon Dec 30 12:32:01 1996
+ Tue Dec 31 17:31:01 1996
+ Tue Dec 31 12:32:01 1996
+ Wed Jan 01 17:31:01 1997
+ Wed Jan 01 12:32:01 1997
+ Fri Feb 28 17:31:01 1997
+ Fri Feb 28 12:32:01 1997
+ Sat Mar 01 17:31:01 1997
+ Sat Mar 01 12:32:01 1997
+ Tue Dec 30 17:31:01 1997
+ Tue Dec 30 12:32:01 1997
+ Wed Dec 31 17:31:01 1997
+ Wed Dec 31 12:32:01 1997
+ Fri Dec 31 17:31:01 1999
+ Fri Dec 31 12:32:01 1999
+ Sat Jan 01 17:31:01 2000
+ Sat Jan 01 12:32:01 2000
+ Sun Dec 31 17:31:01 2000
+ Sun Dec 31 12:32:01 2000
(102 rows)
SELECT t.f1 + i.f1 AS "80" FROM TIME_TBL t, INTERVAL_TBL i;
11:59:59
(80 rows)
-SELECT t.f2 + i.f1 AS "80" FROM TIME_TBL t, INTERVAL_TBL i;
- 80
+SELECT t.f1 + i.f1 AS "100" FROM TIMETZ_TBL t, INTERVAL_TBL i;
+ 100
-------------
+ 00:02:00-07
+ 05:01:00-07
00:01:00-07
- 05:00:00-07
- 00:00:00-07
- 00:00:00-07
- 00:00:00-07
- 23:59:46-07
- 02:03:04-07
- 00:00:00-07
- 00:00:00-07
- 12:00:00-07
+ 00:01:00-07
+ 00:01:00-07
+ 00:00:46-07
+ 02:04:04-07
+ 00:01:00-07
+ 00:01:00-07
+ 12:01:00-07
01:01:00-07
06:00:00-07
01:00:00-07
02:03:00-07
02:03:00-07
14:03:00-07
+ 07:08:00-08
+ 12:07:00-08
+ 07:07:00-08
+ 07:07:00-08
+ 07:07:00-08
+ 07:06:46-08
+ 09:10:04-08
+ 07:07:00-08
+ 07:07:00-08
+ 19:07:00-08
+ 08:09:00-04
+ 13:08:00-04
+ 08:08:00-04
+ 08:08:00-04
+ 08:08:00-04
+ 08:07:46-04
+ 10:11:04-04
+ 08:08:00-04
+ 08:08:00-04
+ 20:08:00-04
12:00:00-07
16:59:00-07
11:59:00-07
23:59:59-07
23:59:59-07
11:59:59-07
-(80 rows)
+(100 rows)
-SELECT t.f2 - i.f1 AS "80" FROM TIME_TBL t, INTERVAL_TBL i;
- 80
+SELECT t.f1 - i.f1 AS "100" FROM TIMETZ_TBL t, INTERVAL_TBL i;
+ 100
-------------
- 23:59:00-07
- 19:00:00-07
00:00:00-07
- 00:00:00-07
- 00:00:00-07
- 00:00:14-07
- 21:56:56-07
- 00:00:00-07
- 00:00:00-07
- 12:00:00-07
+ 19:01:00-07
+ 00:01:00-07
+ 00:01:00-07
+ 00:01:00-07
+ 00:01:14-07
+ 21:57:56-07
+ 00:01:00-07
+ 00:01:00-07
+ 12:01:00-07
00:59:00-07
20:00:00-07
01:00:00-07
02:03:00-07
02:03:00-07
14:03:00-07
+ 07:06:00-08
+ 02:07:00-08
+ 07:07:00-08
+ 07:07:00-08
+ 07:07:00-08
+ 07:07:14-08
+ 05:03:56-08
+ 07:07:00-08
+ 07:07:00-08
+ 19:07:00-08
+ 08:07:00-04
+ 03:08:00-04
+ 08:08:00-04
+ 08:08:00-04
+ 08:08:00-04
+ 08:08:14-04
+ 06:04:56-04
+ 08:08:00-04
+ 08:08:00-04
+ 20:08:00-04
11:58:00-07
06:59:00-07
11:59:00-07
23:59:59-07
23:59:59-07
11:59:59-07
-(80 rows)
+(100 rows)
-- SQL9x OVERLAPS operator
-SELECT (timestamp '2000-11-27', timestamp '2000-11-28')
- OVERLAPS (timestamp '2000-11-27 12:00', timestamp '2000-11-30') AS "True";
+-- test with time zone
+SELECT (timestamp with time zone '2000-11-27', timestamp with time zone '2000-11-28')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', timestamp with time zone '2000-11-30') AS "True";
True
------
t
(1 row)
-SELECT (timestamp '2000-11-26', timestamp '2000-11-27')
- OVERLAPS (timestamp '2000-11-27 12:00', timestamp '2000-11-30') AS "False";
+SELECT (timestamp with time zone '2000-11-26', timestamp with time zone '2000-11-27')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', timestamp with time zone '2000-11-30') AS "False";
False
-------
f
(1 row)
-SELECT (timestamp '2000-11-27', timestamp '2000-11-28')
- OVERLAPS (timestamp '2000-11-27 12:00', interval '1 day') AS "True";
+SELECT (timestamp with time zone '2000-11-27', timestamp with time zone '2000-11-28')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', interval '1 day') AS "True";
True
------
t
(1 row)
-SELECT (timestamp '2000-11-27', interval '12 hours')
- OVERLAPS (timestamp '2000-11-27 12:00', timestamp '2000-11-30') AS "False";
+SELECT (timestamp with time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', timestamp with time zone '2000-11-30') AS "False";
False
-------
f
(1 row)
-SELECT (timestamp '2000-11-27', interval '12 hours')
- OVERLAPS (timestamp '2000-11-27', interval '12 hours') AS "True";
+SELECT (timestamp with time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp with time zone '2000-11-27', interval '12 hours') AS "True";
True
------
t
(1 row)
-SELECT (timestamp '2000-11-27', interval '12 hours')
- OVERLAPS (timestamp '2000-11-27 12:00', interval '12 hours') AS "False";
+SELECT (timestamp with time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', interval '12 hours') AS "False";
False
-------
f
(1 row)
+-- test without time zone
+SELECT (timestamp without time zone '2000-11-27', timestamp without time zone '2000-11-28')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', timestamp without time zone '2000-11-30') AS "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp without time zone '2000-11-26', timestamp without time zone '2000-11-27')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', timestamp without time zone '2000-11-30') AS "False";
+ False
+-------
+ f
+(1 row)
+
+SELECT (timestamp without time zone '2000-11-27', timestamp without time zone '2000-11-28')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', interval '1 day') AS "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp without time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', timestamp without time zone '2000-11-30') AS "False";
+ False
+-------
+ f
+(1 row)
+
+SELECT (timestamp without time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp without time zone '2000-11-27', interval '12 hours') AS "True";
+ True
+------
+ t
+(1 row)
+
+SELECT (timestamp without time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', interval '12 hours') AS "False";
+ False
+-------
+ f
+(1 row)
+
+-- test time and interval
SELECT (time '00:00', time '01:00')
OVERLAPS (time '00:30', time '01:30') AS "True";
True
f
(1 row)
+-- SQL99 seems to want this to be false (and we conform to the spec).
+-- istm that this *should* return true, on the theory that time
+-- intervals can wrap around the day boundary - thomas 2001-09-25
SELECT (time '00:00', interval '1 hour')
- OVERLAPS (time '01:30', interval '1 day') AS "True";
- True
-------
+ OVERLAPS (time '01:30', interval '1 day') AS "False";
+ False
+-------
f
(1 row)
SELECT d1 FROM TIMESTAMP_TBL
WHERE d1 BETWEEN '13-jun-1957' AND '1-jan-1997'
OR d1 BETWEEN '1-jan-1999' AND '1-jan-2010';
-SELECT '' AS "15", f1 AS timestamp
+SELECT '' AS "16", f1 AS timestamp
FROM TEMP_TIMESTAMP
ORDER BY timestamp;
- 15 | timestamp
+ 16 | timestamp
----+------------------------------
- | epoch
+ | Thu Jan 01 00:00:00 1970 PST
| Wed Feb 28 17:32:01 1996 PST
| Thu Feb 29 17:32:01 1996 PST
| Fri Mar 01 17:32:01 1996 PST
| Tue Dec 31 17:32:01 1996 PST
| Fri Dec 31 17:32:01 1999 PST
| Sat Jan 01 17:32:01 2000 PST
- | Wed Mar 15 01:14:05 2000 PST
- | Wed Mar 15 02:14:03 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST
| Wed Mar 15 03:14:04 2000 PST
- | Wed Mar 15 04:14:02 2000 PST
| Wed Mar 15 08:14:01 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST
| Sun Dec 31 17:32:01 2000 PST
| Mon Jan 01 17:32:01 2001 PST
-(15 rows)
+ | Sat Sep 22 18:19:20 2001 PDT
+(16 rows)
-SELECT '' AS "150", d.f1 AS timestamp, t.f1 AS interval, d.f1 + t.f1 AS plus
+SELECT '' AS "160", d.f1 AS timestamp, t.f1 AS interval, d.f1 + t.f1 AS plus
FROM TEMP_TIMESTAMP d, INTERVAL_TBL t
ORDER BY plus, timestamp, interval;
- 150 | timestamp | interval | plus
+ 160 | timestamp | interval | plus
-----+------------------------------+-------------------------------+------------------------------
- | epoch | @ 14 secs ago | Wed Dec 31 15:59:46 1969 PST
- | epoch | @ 1 min | Wed Dec 31 16:01:00 1969 PST
- | epoch | @ 5 hours | Wed Dec 31 21:00:00 1969 PST
- | epoch | @ 1 day 2 hours 3 mins 4 secs | Thu Jan 01 18:03:04 1970 PST
- | epoch | @ 10 days | Sat Jan 10 16:00:00 1970 PST
- | epoch | @ 3 mons | Tue Mar 31 16:00:00 1970 PST
- | epoch | @ 5 mons | Sun May 31 16:00:00 1970 PDT
- | epoch | @ 5 mons 12 hours | Mon Jun 01 04:00:00 1970 PDT
- | epoch | @ 6 years | Wed Dec 31 16:00:00 1975 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 14 secs ago | Wed Dec 31 23:59:46 1969 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 1 min | Thu Jan 01 00:01:00 1970 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 5 hours | Thu Jan 01 05:00:00 1970 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 1 day 2 hours 3 mins 4 secs | Fri Jan 02 02:03:04 1970 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 10 days | Sun Jan 11 00:00:00 1970 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 3 mons | Wed Apr 01 00:00:00 1970 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 5 mons | Mon Jun 01 01:00:00 1970 PDT
+ | Thu Jan 01 00:00:00 1970 PST | @ 5 mons 12 hours | Mon Jun 01 13:00:00 1970 PDT
+ | Thu Jan 01 00:00:00 1970 PST | @ 6 years | Thu Jan 01 00:00:00 1976 PST
| Wed Feb 28 17:32:01 1996 PST | @ 14 secs ago | Wed Feb 28 17:31:47 1996 PST
| Wed Feb 28 17:32:01 1996 PST | @ 1 min | Wed Feb 28 17:33:01 1996 PST
| Wed Feb 28 17:32:01 1996 PST | @ 5 hours | Wed Feb 28 22:32:01 1996 PST
| Wed Feb 28 17:32:01 1996 PST | @ 10 days | Sat Mar 09 17:32:01 1996 PST
| Thu Feb 29 17:32:01 1996 PST | @ 10 days | Sun Mar 10 17:32:01 1996 PST
| Fri Mar 01 17:32:01 1996 PST | @ 10 days | Mon Mar 11 17:32:01 1996 PST
- | Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue May 28 17:32:01 1996 PDT
- | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed May 29 17:32:01 1996 PDT
- | Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Sat Jun 01 17:32:01 1996 PDT
- | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Sun Jul 28 17:32:01 1996 PDT
- | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Mon Jul 29 05:32:01 1996 PDT
- | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Mon Jul 29 17:32:01 1996 PDT
- | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 05:32:01 1996 PDT
- | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Thu Aug 01 17:32:01 1996 PDT
- | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Aug 02 05:32:01 1996 PDT
+ | Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue May 28 18:32:01 1996 PDT
+ | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Fri May 31 18:32:01 1996 PDT
+ | Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Sat Jun 01 18:32:01 1996 PDT
+ | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Sun Jul 28 18:32:01 1996 PDT
+ | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Mon Jul 29 06:32:01 1996 PDT
+ | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Wed Jul 31 18:32:01 1996 PDT
+ | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Thu Aug 01 06:32:01 1996 PDT
+ | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Thu Aug 01 18:32:01 1996 PDT
+ | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Aug 02 06:32:01 1996 PDT
| Mon Dec 30 17:32:01 1996 PST | @ 14 secs ago | Mon Dec 30 17:31:47 1996 PST
| Mon Dec 30 17:32:01 1996 PST | @ 1 min | Mon Dec 30 17:33:01 1996 PST
| Mon Dec 30 17:32:01 1996 PST | @ 5 hours | Mon Dec 30 22:32:01 1996 PST
| Tue Dec 31 17:32:01 1996 PST | @ 10 days | Fri Jan 10 17:32:01 1997 PST
| Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Sun Mar 30 17:32:01 1997 PST
| Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Mar 31 17:32:01 1997 PST
- | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Fri May 30 17:32:01 1997 PDT
- | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Sat May 31 05:32:01 1997 PDT
- | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Sat May 31 17:32:01 1997 PDT
- | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Jun 01 05:32:01 1997 PDT
+ | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Fri May 30 18:32:01 1997 PDT
+ | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Sat May 31 06:32:01 1997 PDT
+ | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Sat May 31 18:32:01 1997 PDT
+ | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Jun 01 06:32:01 1997 PDT
| Fri Dec 31 17:32:01 1999 PST | @ 14 secs ago | Fri Dec 31 17:31:47 1999 PST
| Fri Dec 31 17:32:01 1999 PST | @ 1 min | Fri Dec 31 17:33:01 1999 PST
| Fri Dec 31 17:32:01 1999 PST | @ 5 hours | Fri Dec 31 22:32:01 1999 PST
| Sat Jan 01 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Sun Jan 02 19:35:05 2000 PST
| Fri Dec 31 17:32:01 1999 PST | @ 10 days | Mon Jan 10 17:32:01 2000 PST
| Sat Jan 01 17:32:01 2000 PST | @ 10 days | Tue Jan 11 17:32:01 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 14 secs ago | Wed Mar 15 01:13:51 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 1 min | Wed Mar 15 01:15:05 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 14 secs ago | Wed Mar 15 02:13:49 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 1 min | Wed Mar 15 02:15:03 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 14 secs ago | Wed Mar 15 02:13:51 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 1 min | Wed Mar 15 02:15:05 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 14 secs ago | Wed Mar 15 03:13:50 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 1 min | Wed Mar 15 03:15:04 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 04:13:48 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 1 min | Wed Mar 15 04:15:02 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 5 hours | Wed Mar 15 06:14:05 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 5 hours | Wed Mar 15 07:14:03 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 5 hours | Wed Mar 15 07:14:05 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 14 secs ago | Wed Mar 15 08:13:47 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 5 hours | Wed Mar 15 08:14:04 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 1 min | Wed Mar 15 08:15:01 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 5 hours | Wed Mar 15 09:14:02 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 14 secs ago | Wed Mar 15 12:13:49 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 1 min | Wed Mar 15 12:15:03 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 13:13:48 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 5 hours | Wed Mar 15 13:14:01 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 03:17:09 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 04:17:07 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 1 min | Wed Mar 15 13:15:02 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 5 hours | Wed Mar 15 17:14:03 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 5 hours | Wed Mar 15 18:14:02 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 04:17:09 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 05:17:08 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 06:17:06 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 10:17:05 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 10 days | Sat Mar 25 01:14:05 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 10 days | Sat Mar 25 02:14:03 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 14:17:07 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 15:17:06 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 10 days | Sat Mar 25 02:14:05 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 10 days | Sat Mar 25 03:14:04 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 10 days | Sat Mar 25 04:14:02 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 10 days | Sat Mar 25 08:14:01 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 10 days | Sat Mar 25 12:14:03 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 10 days | Sat Mar 25 13:14:02 2000 PST
| Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Fri Mar 31 17:32:01 2000 PST
| Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Sat Apr 01 17:32:01 2000 PST
- | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Wed May 31 17:32:01 2000 PDT
- | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Thu Jun 01 05:32:01 2000 PDT
- | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Thu Jun 01 17:32:01 2000 PDT
- | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 02 05:32:01 2000 PDT
- | Wed Mar 15 01:14:05 2000 PST | @ 3 mons | Thu Jun 15 01:14:05 2000 PDT
- | Wed Mar 15 02:14:03 2000 PST | @ 3 mons | Thu Jun 15 02:14:03 2000 PDT
- | Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Thu Jun 15 03:14:04 2000 PDT
- | Wed Mar 15 04:14:02 2000 PST | @ 3 mons | Thu Jun 15 04:14:02 2000 PDT
- | Wed Mar 15 08:14:01 2000 PST | @ 3 mons | Thu Jun 15 08:14:01 2000 PDT
- | Wed Mar 15 01:14:05 2000 PST | @ 5 mons | Tue Aug 15 01:14:05 2000 PDT
- | Wed Mar 15 02:14:03 2000 PST | @ 5 mons | Tue Aug 15 02:14:03 2000 PDT
- | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Tue Aug 15 03:14:04 2000 PDT
- | Wed Mar 15 04:14:02 2000 PST | @ 5 mons | Tue Aug 15 04:14:02 2000 PDT
- | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Tue Aug 15 08:14:01 2000 PDT
- | Wed Mar 15 01:14:05 2000 PST | @ 5 mons 12 hours | Tue Aug 15 13:14:05 2000 PDT
- | Wed Mar 15 02:14:03 2000 PST | @ 5 mons 12 hours | Tue Aug 15 14:14:03 2000 PDT
- | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Tue Aug 15 15:14:04 2000 PDT
- | Wed Mar 15 04:14:02 2000 PST | @ 5 mons 12 hours | Tue Aug 15 16:14:02 2000 PDT
- | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Tue Aug 15 20:14:01 2000 PDT
+ | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Wed May 31 18:32:01 2000 PDT
+ | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Thu Jun 01 06:32:01 2000 PDT
+ | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Thu Jun 01 18:32:01 2000 PDT
+ | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 02 06:32:01 2000 PDT
+ | Wed Mar 15 02:14:05 2000 PST | @ 3 mons | Thu Jun 15 03:14:05 2000 PDT
+ | Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Thu Jun 15 04:14:04 2000 PDT
+ | Wed Mar 15 08:14:01 2000 PST | @ 3 mons | Thu Jun 15 09:14:01 2000 PDT
+ | Wed Mar 15 12:14:03 2000 PST | @ 3 mons | Thu Jun 15 13:14:03 2000 PDT
+ | Wed Mar 15 13:14:02 2000 PST | @ 3 mons | Thu Jun 15 14:14:02 2000 PDT
+ | Wed Mar 15 02:14:05 2000 PST | @ 5 mons | Tue Aug 15 03:14:05 2000 PDT
+ | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Tue Aug 15 04:14:04 2000 PDT
+ | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Tue Aug 15 09:14:01 2000 PDT
+ | Wed Mar 15 12:14:03 2000 PST | @ 5 mons | Tue Aug 15 13:14:03 2000 PDT
+ | Wed Mar 15 13:14:02 2000 PST | @ 5 mons | Tue Aug 15 14:14:02 2000 PDT
+ | Wed Mar 15 02:14:05 2000 PST | @ 5 mons 12 hours | Tue Aug 15 15:14:05 2000 PDT
+ | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Tue Aug 15 16:14:04 2000 PDT
+ | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Tue Aug 15 21:14:01 2000 PDT
+ | Wed Mar 15 12:14:03 2000 PST | @ 5 mons 12 hours | Wed Aug 16 01:14:03 2000 PDT
+ | Wed Mar 15 13:14:02 2000 PST | @ 5 mons 12 hours | Wed Aug 16 02:14:02 2000 PDT
| Sun Dec 31 17:32:01 2000 PST | @ 14 secs ago | Sun Dec 31 17:31:47 2000 PST
| Sun Dec 31 17:32:01 2000 PST | @ 1 min | Sun Dec 31 17:33:01 2000 PST
| Sun Dec 31 17:32:01 2000 PST | @ 5 hours | Sun Dec 31 22:32:01 2000 PST
| Sun Dec 31 17:32:01 2000 PST | @ 10 days | Wed Jan 10 17:32:01 2001 PST
| Mon Jan 01 17:32:01 2001 PST | @ 10 days | Thu Jan 11 17:32:01 2001 PST
| Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Mar 31 17:32:01 2001 PST
- | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Apr 01 17:32:01 2001 PDT
- | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Thu May 31 17:32:01 2001 PDT
- | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 01 05:32:01 2001 PDT
- | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Fri Jun 01 17:32:01 2001 PDT
- | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Sat Jun 02 05:32:01 2001 PDT
- | Wed Feb 28 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST
+ | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Apr 01 18:32:01 2001 PDT
+ | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Thu May 31 18:32:01 2001 PDT
+ | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 01 06:32:01 2001 PDT
+ | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Fri Jun 01 18:32:01 2001 PDT
+ | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Sat Jun 02 06:32:01 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 14 secs ago | Sat Sep 22 18:19:06 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 1 min | Sat Sep 22 18:20:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 5 hours | Sat Sep 22 23:19:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 1 day 2 hours 3 mins 4 secs | Sun Sep 23 20:22:24 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 10 days | Tue Oct 02 18:19:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 3 mons | Sat Dec 22 17:19:20 2001 PST
+ | Sat Sep 22 18:19:20 2001 PDT | @ 5 mons | Fri Feb 22 17:19:20 2002 PST
+ | Sat Sep 22 18:19:20 2001 PDT | @ 5 mons 12 hours | Sat Feb 23 05:19:20 2002 PST
+ | Wed Feb 28 17:32:01 1996 PST | @ 6 years | Wed Feb 27 17:32:01 2002 PST
| Thu Feb 29 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST
| Fri Mar 01 17:32:01 1996 PST | @ 6 years | Fri Mar 01 17:32:01 2002 PST
| Mon Dec 30 17:32:01 1996 PST | @ 6 years | Mon Dec 30 17:32:01 2002 PST
| Tue Dec 31 17:32:01 1996 PST | @ 6 years | Tue Dec 31 17:32:01 2002 PST
- | epoch | @ 34 years | Wed Dec 31 16:00:00 2003 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 34 years | Thu Jan 01 00:00:00 2004 PST
| Fri Dec 31 17:32:01 1999 PST | @ 6 years | Sat Dec 31 17:32:01 2005 PST
| Sat Jan 01 17:32:01 2000 PST | @ 6 years | Sun Jan 01 17:32:01 2006 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 6 years | Wed Mar 15 01:14:05 2006 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 6 years | Wed Mar 15 02:14:03 2006 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 6 years | Wed Mar 15 02:14:05 2006 PST
| Wed Mar 15 03:14:04 2000 PST | @ 6 years | Wed Mar 15 03:14:04 2006 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 6 years | Wed Mar 15 04:14:02 2006 PST
| Wed Mar 15 08:14:01 2000 PST | @ 6 years | Wed Mar 15 08:14:01 2006 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 6 years | Wed Mar 15 12:14:03 2006 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 6 years | Wed Mar 15 13:14:02 2006 PST
| Sun Dec 31 17:32:01 2000 PST | @ 6 years | Sun Dec 31 17:32:01 2006 PST
| Mon Jan 01 17:32:01 2001 PST | @ 6 years | Mon Jan 01 17:32:01 2007 PST
- | Wed Feb 28 17:32:01 1996 PST | @ 34 years | Thu Feb 28 17:32:01 2030 PST
+ | Sat Sep 22 18:19:20 2001 PDT | @ 6 years | Sat Sep 22 18:19:20 2007 PDT
+ | Wed Feb 28 17:32:01 1996 PST | @ 34 years | Wed Feb 27 17:32:01 2030 PST
| Thu Feb 29 17:32:01 1996 PST | @ 34 years | Thu Feb 28 17:32:01 2030 PST
| Fri Mar 01 17:32:01 1996 PST | @ 34 years | Fri Mar 01 17:32:01 2030 PST
| Mon Dec 30 17:32:01 1996 PST | @ 34 years | Mon Dec 30 17:32:01 2030 PST
| Tue Dec 31 17:32:01 1996 PST | @ 34 years | Tue Dec 31 17:32:01 2030 PST
| Fri Dec 31 17:32:01 1999 PST | @ 34 years | Sat Dec 31 17:32:01 2033 PST
| Sat Jan 01 17:32:01 2000 PST | @ 34 years | Sun Jan 01 17:32:01 2034 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 34 years | Wed Mar 15 01:14:05 2034 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 34 years | Wed Mar 15 02:14:03 2034 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 34 years | Wed Mar 15 02:14:05 2034 PST
| Wed Mar 15 03:14:04 2000 PST | @ 34 years | Wed Mar 15 03:14:04 2034 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 34 years | Wed Mar 15 04:14:02 2034 PST
| Wed Mar 15 08:14:01 2000 PST | @ 34 years | Wed Mar 15 08:14:01 2034 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 34 years | Wed Mar 15 12:14:03 2034 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 34 years | Wed Mar 15 13:14:02 2034 PST
| Sun Dec 31 17:32:01 2000 PST | @ 34 years | Sun Dec 31 17:32:01 2034 PST
| Mon Jan 01 17:32:01 2001 PST | @ 34 years | Mon Jan 01 17:32:01 2035 PST
-(150 rows)
+ | Sat Sep 22 18:19:20 2001 PDT | @ 34 years | Sat Sep 22 18:19:20 2035 PDT
+(160 rows)
-SELECT '' AS "150", d.f1 AS timestamp, t.f1 AS interval, d.f1 - t.f1 AS minus
+SELECT '' AS "160", d.f1 AS timestamp, t.f1 AS interval, d.f1 - t.f1 AS minus
FROM TEMP_TIMESTAMP d, INTERVAL_TBL t
WHERE isfinite(d.f1)
ORDER BY minus, timestamp, interval;
- 150 | timestamp | interval | minus
+ 160 | timestamp | interval | minus
-----+------------------------------+-------------------------------+------------------------------
- | epoch | @ 34 years | Tue Dec 31 16:00:00 1935 PST
- | Wed Feb 28 17:32:01 1996 PST | @ 34 years | Wed Feb 28 17:32:01 1962 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 34 years | Wed Jan 01 00:00:00 1936 PST
+ | Wed Feb 28 17:32:01 1996 PST | @ 34 years | Tue Feb 27 17:32:01 1962 PST
| Thu Feb 29 17:32:01 1996 PST | @ 34 years | Wed Feb 28 17:32:01 1962 PST
| Fri Mar 01 17:32:01 1996 PST | @ 34 years | Thu Mar 01 17:32:01 1962 PST
| Mon Dec 30 17:32:01 1996 PST | @ 34 years | Sun Dec 30 17:32:01 1962 PST
| Tue Dec 31 17:32:01 1996 PST | @ 34 years | Mon Dec 31 17:32:01 1962 PST
- | epoch | @ 6 years | Tue Dec 31 16:00:00 1963 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 6 years | Wed Jan 01 00:00:00 1964 PST
| Fri Dec 31 17:32:01 1999 PST | @ 34 years | Fri Dec 31 17:32:01 1965 PST
| Sat Jan 01 17:32:01 2000 PST | @ 34 years | Sat Jan 01 17:32:01 1966 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 34 years | Tue Mar 15 01:14:05 1966 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 34 years | Tue Mar 15 02:14:03 1966 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 34 years | Tue Mar 15 02:14:05 1966 PST
| Wed Mar 15 03:14:04 2000 PST | @ 34 years | Tue Mar 15 03:14:04 1966 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 34 years | Tue Mar 15 04:14:02 1966 PST
| Wed Mar 15 08:14:01 2000 PST | @ 34 years | Tue Mar 15 08:14:01 1966 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 34 years | Tue Mar 15 12:14:03 1966 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 34 years | Tue Mar 15 13:14:02 1966 PST
| Sun Dec 31 17:32:01 2000 PST | @ 34 years | Sat Dec 31 17:32:01 1966 PST
| Mon Jan 01 17:32:01 2001 PST | @ 34 years | Sun Jan 01 17:32:01 1967 PST
- | epoch | @ 5 mons 12 hours | Thu Jul 31 04:00:00 1969 PDT
- | epoch | @ 5 mons | Thu Jul 31 16:00:00 1969 PDT
- | epoch | @ 3 mons | Tue Sep 30 16:00:00 1969 PDT
- | epoch | @ 10 days | Sun Dec 21 16:00:00 1969 PST
- | epoch | @ 1 day 2 hours 3 mins 4 secs | Tue Dec 30 13:56:56 1969 PST
- | epoch | @ 5 hours | Wed Dec 31 11:00:00 1969 PST
- | epoch | @ 1 min | Wed Dec 31 15:59:00 1969 PST
- | epoch | @ 14 secs ago | Wed Dec 31 16:00:14 1969 PST
- | Wed Feb 28 17:32:01 1996 PST | @ 6 years | Wed Feb 28 17:32:01 1990 PST
+ | Sat Sep 22 18:19:20 2001 PDT | @ 34 years | Fri Sep 22 18:19:20 1967 PDT
+ | Thu Jan 01 00:00:00 1970 PST | @ 5 mons 12 hours | Thu Jul 31 13:00:00 1969 PDT
+ | Thu Jan 01 00:00:00 1970 PST | @ 5 mons | Fri Aug 01 01:00:00 1969 PDT
+ | Thu Jan 01 00:00:00 1970 PST | @ 3 mons | Wed Oct 01 01:00:00 1969 PDT
+ | Thu Jan 01 00:00:00 1970 PST | @ 10 days | Mon Dec 22 00:00:00 1969 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Dec 30 21:56:56 1969 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 5 hours | Wed Dec 31 19:00:00 1969 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 1 min | Wed Dec 31 23:59:00 1969 PST
+ | Thu Jan 01 00:00:00 1970 PST | @ 14 secs ago | Thu Jan 01 00:00:14 1970 PST
+ | Wed Feb 28 17:32:01 1996 PST | @ 6 years | Tue Feb 27 17:32:01 1990 PST
| Thu Feb 29 17:32:01 1996 PST | @ 6 years | Wed Feb 28 17:32:01 1990 PST
| Fri Mar 01 17:32:01 1996 PST | @ 6 years | Thu Mar 01 17:32:01 1990 PST
| Mon Dec 30 17:32:01 1996 PST | @ 6 years | Sun Dec 30 17:32:01 1990 PST
| Tue Dec 31 17:32:01 1996 PST | @ 6 years | Mon Dec 31 17:32:01 1990 PST
| Fri Dec 31 17:32:01 1999 PST | @ 6 years | Fri Dec 31 17:32:01 1993 PST
| Sat Jan 01 17:32:01 2000 PST | @ 6 years | Sat Jan 01 17:32:01 1994 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 6 years | Tue Mar 15 01:14:05 1994 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 6 years | Tue Mar 15 02:14:03 1994 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 6 years | Tue Mar 15 02:14:05 1994 PST
| Wed Mar 15 03:14:04 2000 PST | @ 6 years | Tue Mar 15 03:14:04 1994 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 6 years | Tue Mar 15 04:14:02 1994 PST
| Wed Mar 15 08:14:01 2000 PST | @ 6 years | Tue Mar 15 08:14:01 1994 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 6 years | Tue Mar 15 12:14:03 1994 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 6 years | Tue Mar 15 13:14:02 1994 PST
| Sun Dec 31 17:32:01 2000 PST | @ 6 years | Sat Dec 31 17:32:01 1994 PST
| Mon Jan 01 17:32:01 2001 PST | @ 6 years | Sun Jan 01 17:32:01 1995 PST
- | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Thu Sep 28 05:32:01 1995 PDT
- | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Thu Sep 28 17:32:01 1995 PDT
- | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Sep 29 05:32:01 1995 PDT
- | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Fri Sep 29 17:32:01 1995 PDT
- | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Oct 01 05:32:01 1995 PDT
- | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Sun Oct 01 17:32:01 1995 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 6 years | Fri Sep 22 18:19:20 1995 PDT
+ | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Thu Sep 28 06:32:01 1995 PDT
+ | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Thu Sep 28 18:32:01 1995 PDT
+ | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Sat Sep 30 06:32:01 1995 PDT
+ | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Sat Sep 30 18:32:01 1995 PDT
+ | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Oct 01 06:32:01 1995 PDT
+ | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Sun Oct 01 18:32:01 1995 PDT
| Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue Nov 28 17:32:01 1995 PST
- | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed Nov 29 17:32:01 1995 PST
+ | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Thu Nov 30 17:32:01 1995 PST
| Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Fri Dec 01 17:32:01 1995 PST
| Wed Feb 28 17:32:01 1996 PST | @ 10 days | Sun Feb 18 17:32:01 1996 PST
| Thu Feb 29 17:32:01 1996 PST | @ 10 days | Mon Feb 19 17:32:01 1996 PST
| Fri Mar 01 17:32:01 1996 PST | @ 5 hours | Fri Mar 01 12:32:01 1996 PST
| Fri Mar 01 17:32:01 1996 PST | @ 1 min | Fri Mar 01 17:31:01 1996 PST
| Fri Mar 01 17:32:01 1996 PST | @ 14 secs ago | Fri Mar 01 17:32:15 1996 PST
- | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 05:32:01 1996 PDT
- | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Tue Jul 30 17:32:01 1996 PDT
- | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Wed Jul 31 05:32:01 1996 PDT
- | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Wed Jul 31 17:32:01 1996 PDT
- | Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 17:32:01 1996 PDT
- | Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 17:32:01 1996 PDT
+ | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 06:32:01 1996 PDT
+ | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Tue Jul 30 18:32:01 1996 PDT
+ | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Wed Jul 31 06:32:01 1996 PDT
+ | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Wed Jul 31 18:32:01 1996 PDT
+ | Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Sun Sep 29 18:32:01 1996 PDT
+ | Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 18:32:01 1996 PDT
| Mon Dec 30 17:32:01 1996 PST | @ 10 days | Fri Dec 20 17:32:01 1996 PST
| Tue Dec 31 17:32:01 1996 PST | @ 10 days | Sat Dec 21 17:32:01 1996 PST
| Mon Dec 30 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Sun Dec 29 15:28:57 1996 PST
| Tue Dec 31 17:32:01 1996 PST | @ 5 hours | Tue Dec 31 12:32:01 1996 PST
| Tue Dec 31 17:32:01 1996 PST | @ 1 min | Tue Dec 31 17:31:01 1996 PST
| Tue Dec 31 17:32:01 1996 PST | @ 14 secs ago | Tue Dec 31 17:32:15 1996 PST
- | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Sat Jul 31 05:32:01 1999 PDT
- | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Sat Jul 31 17:32:01 1999 PDT
- | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Sun Aug 01 05:32:01 1999 PDT
- | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Sun Aug 01 17:32:01 1999 PDT
- | Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Thu Sep 30 17:32:01 1999 PDT
- | Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Fri Oct 01 17:32:01 1999 PDT
- | Wed Mar 15 01:14:05 2000 PST | @ 5 mons 12 hours | Thu Oct 14 13:14:05 1999 PDT
- | Wed Mar 15 02:14:03 2000 PST | @ 5 mons 12 hours | Thu Oct 14 14:14:03 1999 PDT
- | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Thu Oct 14 15:14:04 1999 PDT
- | Wed Mar 15 04:14:02 2000 PST | @ 5 mons 12 hours | Thu Oct 14 16:14:02 1999 PDT
- | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Thu Oct 14 20:14:01 1999 PDT
- | Wed Mar 15 01:14:05 2000 PST | @ 5 mons | Fri Oct 15 01:14:05 1999 PDT
- | Wed Mar 15 02:14:03 2000 PST | @ 5 mons | Fri Oct 15 02:14:03 1999 PDT
- | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Fri Oct 15 03:14:04 1999 PDT
- | Wed Mar 15 04:14:02 2000 PST | @ 5 mons | Fri Oct 15 04:14:02 1999 PDT
- | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Fri Oct 15 08:14:01 1999 PDT
- | Wed Mar 15 01:14:05 2000 PST | @ 3 mons | Wed Dec 15 01:14:05 1999 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 3 mons | Wed Dec 15 02:14:03 1999 PST
+ | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Sat Jul 31 06:32:01 1999 PDT
+ | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Sat Jul 31 18:32:01 1999 PDT
+ | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Sun Aug 01 06:32:01 1999 PDT
+ | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Sun Aug 01 18:32:01 1999 PDT
+ | Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Thu Sep 30 18:32:01 1999 PDT
+ | Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Fri Oct 01 18:32:01 1999 PDT
+ | Wed Mar 15 02:14:05 2000 PST | @ 5 mons 12 hours | Thu Oct 14 15:14:05 1999 PDT
+ | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Thu Oct 14 16:14:04 1999 PDT
+ | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Thu Oct 14 21:14:01 1999 PDT
+ | Wed Mar 15 12:14:03 2000 PST | @ 5 mons 12 hours | Fri Oct 15 01:14:03 1999 PDT
+ | Wed Mar 15 13:14:02 2000 PST | @ 5 mons 12 hours | Fri Oct 15 02:14:02 1999 PDT
+ | Wed Mar 15 02:14:05 2000 PST | @ 5 mons | Fri Oct 15 03:14:05 1999 PDT
+ | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Fri Oct 15 04:14:04 1999 PDT
+ | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Fri Oct 15 09:14:01 1999 PDT
+ | Wed Mar 15 12:14:03 2000 PST | @ 5 mons | Fri Oct 15 13:14:03 1999 PDT
+ | Wed Mar 15 13:14:02 2000 PST | @ 5 mons | Fri Oct 15 14:14:02 1999 PDT
+ | Wed Mar 15 02:14:05 2000 PST | @ 3 mons | Wed Dec 15 02:14:05 1999 PST
| Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Wed Dec 15 03:14:04 1999 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 3 mons | Wed Dec 15 04:14:02 1999 PST
| Wed Mar 15 08:14:01 2000 PST | @ 3 mons | Wed Dec 15 08:14:01 1999 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 3 mons | Wed Dec 15 12:14:03 1999 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 3 mons | Wed Dec 15 13:14:02 1999 PST
| Fri Dec 31 17:32:01 1999 PST | @ 10 days | Tue Dec 21 17:32:01 1999 PST
| Sat Jan 01 17:32:01 2000 PST | @ 10 days | Wed Dec 22 17:32:01 1999 PST
| Fri Dec 31 17:32:01 1999 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Dec 30 15:28:57 1999 PST
| Sat Jan 01 17:32:01 2000 PST | @ 5 hours | Sat Jan 01 12:32:01 2000 PST
| Sat Jan 01 17:32:01 2000 PST | @ 1 min | Sat Jan 01 17:31:01 2000 PST
| Sat Jan 01 17:32:01 2000 PST | @ 14 secs ago | Sat Jan 01 17:32:15 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 10 days | Sun Mar 05 01:14:05 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 10 days | Sun Mar 05 02:14:03 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 10 days | Sun Mar 05 02:14:05 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 10 days | Sun Mar 05 03:14:04 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 10 days | Sun Mar 05 04:14:02 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 10 days | Sun Mar 05 08:14:01 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Mon Mar 13 23:11:01 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 00:10:59 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 10 days | Sun Mar 05 12:14:03 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 10 days | Sun Mar 05 13:14:02 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 00:11:01 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 01:11:00 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 02:10:58 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 06:10:57 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 5 hours | Tue Mar 14 20:14:05 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 5 hours | Tue Mar 14 21:14:03 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 10:10:59 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Mar 14 11:10:58 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 5 hours | Tue Mar 14 21:14:05 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 5 hours | Tue Mar 14 22:14:04 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 5 hours | Tue Mar 14 23:14:02 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 1 min | Wed Mar 15 01:13:05 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | @ 14 secs ago | Wed Mar 15 01:14:19 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 1 min | Wed Mar 15 02:13:03 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | @ 14 secs ago | Wed Mar 15 02:14:17 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 1 min | Wed Mar 15 02:13:05 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | @ 14 secs ago | Wed Mar 15 02:14:19 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 1 min | Wed Mar 15 03:13:04 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 5 hours | Wed Mar 15 03:14:01 2000 PST
| Wed Mar 15 03:14:04 2000 PST | @ 14 secs ago | Wed Mar 15 03:14:18 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 1 min | Wed Mar 15 04:13:02 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 04:14:16 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 5 hours | Wed Mar 15 07:14:03 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 1 min | Wed Mar 15 08:13:01 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 5 hours | Wed Mar 15 08:14:02 2000 PST
| Wed Mar 15 08:14:01 2000 PST | @ 14 secs ago | Wed Mar 15 08:14:15 2000 PST
- | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Mon Jul 31 05:32:01 2000 PDT
- | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Mon Jul 31 17:32:01 2000 PDT
- | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Tue Aug 01 05:32:01 2000 PDT
- | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Tue Aug 01 17:32:01 2000 PDT
- | Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Sep 30 17:32:01 2000 PDT
- | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Oct 01 17:32:01 2000 PDT
+ | Wed Mar 15 12:14:03 2000 PST | @ 1 min | Wed Mar 15 12:13:03 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | @ 14 secs ago | Wed Mar 15 12:14:17 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 1 min | Wed Mar 15 13:13:02 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 13:14:16 2000 PST
+ | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Mon Jul 31 06:32:01 2000 PDT
+ | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Mon Jul 31 18:32:01 2000 PDT
+ | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Tue Aug 01 06:32:01 2000 PDT
+ | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Tue Aug 01 18:32:01 2000 PDT
+ | Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Sep 30 18:32:01 2000 PDT
+ | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Oct 01 18:32:01 2000 PDT
| Sun Dec 31 17:32:01 2000 PST | @ 10 days | Thu Dec 21 17:32:01 2000 PST
| Mon Jan 01 17:32:01 2001 PST | @ 10 days | Fri Dec 22 17:32:01 2000 PST
| Sun Dec 31 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Dec 30 15:28:57 2000 PST
| Mon Jan 01 17:32:01 2001 PST | @ 5 hours | Mon Jan 01 12:32:01 2001 PST
| Mon Jan 01 17:32:01 2001 PST | @ 1 min | Mon Jan 01 17:31:01 2001 PST
| Mon Jan 01 17:32:01 2001 PST | @ 14 secs ago | Mon Jan 01 17:32:15 2001 PST
-(150 rows)
-
-SELECT '' AS "15", d.f1 AS timestamp, timestamp '1980-01-06 00:00 GMT' AS gpstime_zero,
+ | Sat Sep 22 18:19:20 2001 PDT | @ 5 mons 12 hours | Sun Apr 22 06:19:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 5 mons | Sun Apr 22 18:19:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 3 mons | Fri Jun 22 18:19:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 10 days | Wed Sep 12 18:19:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 1 day 2 hours 3 mins 4 secs | Fri Sep 21 16:16:16 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 5 hours | Sat Sep 22 13:19:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 1 min | Sat Sep 22 18:18:20 2001 PDT
+ | Sat Sep 22 18:19:20 2001 PDT | @ 14 secs ago | Sat Sep 22 18:19:34 2001 PDT
+(160 rows)
+
+SELECT '' AS "16", d.f1 AS timestamp, timestamp '1980-01-06 00:00 GMT' AS gpstime_zero,
d.f1 - timestamp '1980-01-06 00:00 GMT' AS difference
FROM TEMP_TIMESTAMP d
ORDER BY difference;
- 15 | timestamp | gpstime_zero | difference
+ 16 | timestamp | gpstime_zero | difference
----+------------------------------+------------------------------+-------------------------------------
- | epoch | Sat Jan 05 16:00:00 1980 PST | @ 3657 days ago
+ | Thu Jan 01 00:00:00 1970 PST | Sat Jan 05 16:00:00 1980 PST | @ 3656 days 16 hours ago
| Wed Feb 28 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 5898 days 1 hour 32 mins 1 sec
| Thu Feb 29 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 5899 days 1 hour 32 mins 1 sec
| Fri Mar 01 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 5900 days 1 hour 32 mins 1 sec
| Tue Dec 31 17:32:01 1996 PST | Sat Jan 05 16:00:00 1980 PST | @ 6205 days 1 hour 32 mins 1 sec
| Fri Dec 31 17:32:01 1999 PST | Sat Jan 05 16:00:00 1980 PST | @ 7300 days 1 hour 32 mins 1 sec
| Sat Jan 01 17:32:01 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7301 days 1 hour 32 mins 1 sec
- | Wed Mar 15 01:14:05 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 9 hours 14 mins 5 secs
- | Wed Mar 15 02:14:03 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 10 hours 14 mins 3 secs
+ | Wed Mar 15 02:14:05 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 10 hours 14 mins 5 secs
| Wed Mar 15 03:14:04 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 11 hours 14 mins 4 secs
- | Wed Mar 15 04:14:02 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 12 hours 14 mins 2 secs
| Wed Mar 15 08:14:01 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 16 hours 14 mins 1 sec
+ | Wed Mar 15 12:14:03 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 20 hours 14 mins 3 secs
+ | Wed Mar 15 13:14:02 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7374 days 21 hours 14 mins 2 secs
| Sun Dec 31 17:32:01 2000 PST | Sat Jan 05 16:00:00 1980 PST | @ 7666 days 1 hour 32 mins 1 sec
| Mon Jan 01 17:32:01 2001 PST | Sat Jan 05 16:00:00 1980 PST | @ 7667 days 1 hour 32 mins 1 sec
-(15 rows)
+ | Sat Sep 22 18:19:20 2001 PDT | Sat Jan 05 16:00:00 1980 PST | @ 7931 days 1 hour 19 mins 20 secs
+(16 rows)
-SELECT '' AS "225", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS difference
+SELECT '' AS "226", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS difference
FROM TEMP_TIMESTAMP d1, TEMP_TIMESTAMP d2
ORDER BY timestamp1, timestamp2, difference;
- 225 | timestamp1 | timestamp2 | difference
------+------------------------------+------------------------------+------------------------------------------
- | epoch | epoch | @ 0
- | epoch | Wed Feb 28 17:32:01 1996 PST | @ 9555 days 1 hour 32 mins 1 sec ago
- | epoch | Thu Feb 29 17:32:01 1996 PST | @ 9556 days 1 hour 32 mins 1 sec ago
- | epoch | Fri Mar 01 17:32:01 1996 PST | @ 9557 days 1 hour 32 mins 1 sec ago
- | epoch | Mon Dec 30 17:32:01 1996 PST | @ 9861 days 1 hour 32 mins 1 sec ago
- | epoch | Tue Dec 31 17:32:01 1996 PST | @ 9862 days 1 hour 32 mins 1 sec ago
- | epoch | Fri Dec 31 17:32:01 1999 PST | @ 10957 days 1 hour 32 mins 1 sec ago
- | epoch | Sat Jan 01 17:32:01 2000 PST | @ 10958 days 1 hour 32 mins 1 sec ago
- | epoch | Wed Mar 15 01:14:05 2000 PST | @ 11031 days 9 hours 14 mins 5 secs ago
- | epoch | Wed Mar 15 02:14:03 2000 PST | @ 11031 days 10 hours 14 mins 3 secs ago
- | epoch | Wed Mar 15 03:14:04 2000 PST | @ 11031 days 11 hours 14 mins 4 secs ago
- | epoch | Wed Mar 15 04:14:02 2000 PST | @ 11031 days 12 hours 14 mins 2 secs ago
- | epoch | Wed Mar 15 08:14:01 2000 PST | @ 11031 days 16 hours 14 mins 1 sec ago
- | epoch | Sun Dec 31 17:32:01 2000 PST | @ 11323 days 1 hour 32 mins 1 sec ago
- | epoch | Mon Jan 01 17:32:01 2001 PST | @ 11324 days 1 hour 32 mins 1 sec ago
- | Wed Feb 28 17:32:01 1996 PST | epoch | @ 9555 days 1 hour 32 mins 1 sec
+ 226 | timestamp1 | timestamp2 | difference
+-----+------------------------------+------------------------------+-------------------------------------------
+ | Thu Jan 01 00:00:00 1970 PST | Thu Jan 01 00:00:00 1970 PST | @ 0
+ | Thu Jan 01 00:00:00 1970 PST | Wed Feb 28 17:32:01 1996 PST | @ 9554 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Thu Feb 29 17:32:01 1996 PST | @ 9555 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Fri Mar 01 17:32:01 1996 PST | @ 9556 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Mon Dec 30 17:32:01 1996 PST | @ 9860 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Tue Dec 31 17:32:01 1996 PST | @ 9861 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Fri Dec 31 17:32:01 1999 PST | @ 10956 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Sat Jan 01 17:32:01 2000 PST | @ 10957 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 02:14:05 2000 PST | @ 11031 days 2 hours 14 mins 5 secs ago
+ | Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 03:14:04 2000 PST | @ 11031 days 3 hours 14 mins 4 secs ago
+ | Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 08:14:01 2000 PST | @ 11031 days 8 hours 14 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 12:14:03 2000 PST | @ 11031 days 12 hours 14 mins 3 secs ago
+ | Thu Jan 01 00:00:00 1970 PST | Wed Mar 15 13:14:02 2000 PST | @ 11031 days 13 hours 14 mins 2 secs ago
+ | Thu Jan 01 00:00:00 1970 PST | Sun Dec 31 17:32:01 2000 PST | @ 11322 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Mon Jan 01 17:32:01 2001 PST | @ 11323 days 17 hours 32 mins 1 sec ago
+ | Thu Jan 01 00:00:00 1970 PST | Sat Sep 22 18:19:20 2001 PDT | @ 11587 days 17 hours 19 mins 20 secs ago
+ | Wed Feb 28 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9554 days 17 hours 32 mins 1 sec
| Wed Feb 28 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 0
| Wed Feb 28 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 1 day ago
| Wed Feb 28 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 2 days ago
| Wed Feb 28 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 307 days ago
| Wed Feb 28 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1402 days ago
| Wed Feb 28 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1403 days ago
- | Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 01:14:05 2000 PST | @ 1476 days 7 hours 42 mins 4 secs ago
- | Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 02:14:03 2000 PST | @ 1476 days 8 hours 42 mins 2 secs ago
+ | Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1476 days 8 hours 42 mins 4 secs ago
| Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1476 days 9 hours 42 mins 3 secs ago
- | Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 04:14:02 2000 PST | @ 1476 days 10 hours 42 mins 1 sec ago
| Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1476 days 14 hours 42 mins ago
+ | Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1476 days 18 hours 42 mins 2 secs ago
+ | Wed Feb 28 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1476 days 19 hours 42 mins 1 sec ago
| Wed Feb 28 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1768 days ago
| Wed Feb 28 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1769 days ago
- | Thu Feb 29 17:32:01 1996 PST | epoch | @ 9556 days 1 hour 32 mins 1 sec
+ | Wed Feb 28 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 2032 days 23 hours 47 mins 19 secs ago
+ | Thu Feb 29 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9555 days 17 hours 32 mins 1 sec
| Thu Feb 29 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 1 day
| Thu Feb 29 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 0
| Thu Feb 29 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 1 day ago
| Thu Feb 29 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 306 days ago
| Thu Feb 29 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1401 days ago
| Thu Feb 29 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1402 days ago
- | Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 01:14:05 2000 PST | @ 1475 days 7 hours 42 mins 4 secs ago
- | Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 02:14:03 2000 PST | @ 1475 days 8 hours 42 mins 2 secs ago
+ | Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1475 days 8 hours 42 mins 4 secs ago
| Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1475 days 9 hours 42 mins 3 secs ago
- | Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 04:14:02 2000 PST | @ 1475 days 10 hours 42 mins 1 sec ago
| Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1475 days 14 hours 42 mins ago
+ | Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1475 days 18 hours 42 mins 2 secs ago
+ | Thu Feb 29 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1475 days 19 hours 42 mins 1 sec ago
| Thu Feb 29 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1767 days ago
| Thu Feb 29 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1768 days ago
- | Fri Mar 01 17:32:01 1996 PST | epoch | @ 9557 days 1 hour 32 mins 1 sec
+ | Thu Feb 29 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 2031 days 23 hours 47 mins 19 secs ago
+ | Fri Mar 01 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9556 days 17 hours 32 mins 1 sec
| Fri Mar 01 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 2 days
| Fri Mar 01 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 1 day
| Fri Mar 01 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 0
| Fri Mar 01 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 305 days ago
| Fri Mar 01 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1400 days ago
| Fri Mar 01 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1401 days ago
- | Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 01:14:05 2000 PST | @ 1474 days 7 hours 42 mins 4 secs ago
- | Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 02:14:03 2000 PST | @ 1474 days 8 hours 42 mins 2 secs ago
+ | Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1474 days 8 hours 42 mins 4 secs ago
| Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1474 days 9 hours 42 mins 3 secs ago
- | Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 04:14:02 2000 PST | @ 1474 days 10 hours 42 mins 1 sec ago
| Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1474 days 14 hours 42 mins ago
+ | Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1474 days 18 hours 42 mins 2 secs ago
+ | Fri Mar 01 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1474 days 19 hours 42 mins 1 sec ago
| Fri Mar 01 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1766 days ago
| Fri Mar 01 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1767 days ago
- | Mon Dec 30 17:32:01 1996 PST | epoch | @ 9861 days 1 hour 32 mins 1 sec
+ | Fri Mar 01 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 2030 days 23 hours 47 mins 19 secs ago
+ | Mon Dec 30 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9860 days 17 hours 32 mins 1 sec
| Mon Dec 30 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 306 days
| Mon Dec 30 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 305 days
| Mon Dec 30 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 304 days
| Mon Dec 30 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 1 day ago
| Mon Dec 30 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1096 days ago
| Mon Dec 30 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1097 days ago
- | Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 01:14:05 2000 PST | @ 1170 days 7 hours 42 mins 4 secs ago
- | Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 02:14:03 2000 PST | @ 1170 days 8 hours 42 mins 2 secs ago
+ | Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1170 days 8 hours 42 mins 4 secs ago
| Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1170 days 9 hours 42 mins 3 secs ago
- | Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 04:14:02 2000 PST | @ 1170 days 10 hours 42 mins 1 sec ago
| Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1170 days 14 hours 42 mins ago
+ | Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1170 days 18 hours 42 mins 2 secs ago
+ | Mon Dec 30 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1170 days 19 hours 42 mins 1 sec ago
| Mon Dec 30 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1462 days ago
| Mon Dec 30 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1463 days ago
- | Tue Dec 31 17:32:01 1996 PST | epoch | @ 9862 days 1 hour 32 mins 1 sec
+ | Mon Dec 30 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 1726 days 23 hours 47 mins 19 secs ago
+ | Tue Dec 31 17:32:01 1996 PST | Thu Jan 01 00:00:00 1970 PST | @ 9861 days 17 hours 32 mins 1 sec
| Tue Dec 31 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST | @ 307 days
| Tue Dec 31 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST | @ 306 days
| Tue Dec 31 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST | @ 305 days
| Tue Dec 31 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST | @ 0
| Tue Dec 31 17:32:01 1996 PST | Fri Dec 31 17:32:01 1999 PST | @ 1095 days ago
| Tue Dec 31 17:32:01 1996 PST | Sat Jan 01 17:32:01 2000 PST | @ 1096 days ago
- | Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 01:14:05 2000 PST | @ 1169 days 7 hours 42 mins 4 secs ago
- | Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 02:14:03 2000 PST | @ 1169 days 8 hours 42 mins 2 secs ago
+ | Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 02:14:05 2000 PST | @ 1169 days 8 hours 42 mins 4 secs ago
| Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 03:14:04 2000 PST | @ 1169 days 9 hours 42 mins 3 secs ago
- | Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 04:14:02 2000 PST | @ 1169 days 10 hours 42 mins 1 sec ago
| Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 08:14:01 2000 PST | @ 1169 days 14 hours 42 mins ago
+ | Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 12:14:03 2000 PST | @ 1169 days 18 hours 42 mins 2 secs ago
+ | Tue Dec 31 17:32:01 1996 PST | Wed Mar 15 13:14:02 2000 PST | @ 1169 days 19 hours 42 mins 1 sec ago
| Tue Dec 31 17:32:01 1996 PST | Sun Dec 31 17:32:01 2000 PST | @ 1461 days ago
| Tue Dec 31 17:32:01 1996 PST | Mon Jan 01 17:32:01 2001 PST | @ 1462 days ago
- | Fri Dec 31 17:32:01 1999 PST | epoch | @ 10957 days 1 hour 32 mins 1 sec
+ | Tue Dec 31 17:32:01 1996 PST | Sat Sep 22 18:19:20 2001 PDT | @ 1725 days 23 hours 47 mins 19 secs ago
+ | Fri Dec 31 17:32:01 1999 PST | Thu Jan 01 00:00:00 1970 PST | @ 10956 days 17 hours 32 mins 1 sec
| Fri Dec 31 17:32:01 1999 PST | Wed Feb 28 17:32:01 1996 PST | @ 1402 days
| Fri Dec 31 17:32:01 1999 PST | Thu Feb 29 17:32:01 1996 PST | @ 1401 days
| Fri Dec 31 17:32:01 1999 PST | Fri Mar 01 17:32:01 1996 PST | @ 1400 days
| Fri Dec 31 17:32:01 1999 PST | Tue Dec 31 17:32:01 1996 PST | @ 1095 days
| Fri Dec 31 17:32:01 1999 PST | Fri Dec 31 17:32:01 1999 PST | @ 0
| Fri Dec 31 17:32:01 1999 PST | Sat Jan 01 17:32:01 2000 PST | @ 1 day ago
- | Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 01:14:05 2000 PST | @ 74 days 7 hours 42 mins 4 secs ago
- | Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 02:14:03 2000 PST | @ 74 days 8 hours 42 mins 2 secs ago
+ | Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 02:14:05 2000 PST | @ 74 days 8 hours 42 mins 4 secs ago
| Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 03:14:04 2000 PST | @ 74 days 9 hours 42 mins 3 secs ago
- | Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 04:14:02 2000 PST | @ 74 days 10 hours 42 mins 1 sec ago
| Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 08:14:01 2000 PST | @ 74 days 14 hours 42 mins ago
+ | Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 12:14:03 2000 PST | @ 74 days 18 hours 42 mins 2 secs ago
+ | Fri Dec 31 17:32:01 1999 PST | Wed Mar 15 13:14:02 2000 PST | @ 74 days 19 hours 42 mins 1 sec ago
| Fri Dec 31 17:32:01 1999 PST | Sun Dec 31 17:32:01 2000 PST | @ 366 days ago
| Fri Dec 31 17:32:01 1999 PST | Mon Jan 01 17:32:01 2001 PST | @ 367 days ago
- | Sat Jan 01 17:32:01 2000 PST | epoch | @ 10958 days 1 hour 32 mins 1 sec
+ | Fri Dec 31 17:32:01 1999 PST | Sat Sep 22 18:19:20 2001 PDT | @ 630 days 23 hours 47 mins 19 secs ago
+ | Sat Jan 01 17:32:01 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 10957 days 17 hours 32 mins 1 sec
| Sat Jan 01 17:32:01 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1403 days
| Sat Jan 01 17:32:01 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1402 days
| Sat Jan 01 17:32:01 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1401 days
| Sat Jan 01 17:32:01 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1096 days
| Sat Jan 01 17:32:01 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 1 day
| Sat Jan 01 17:32:01 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 0
- | Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 01:14:05 2000 PST | @ 73 days 7 hours 42 mins 4 secs ago
- | Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 02:14:03 2000 PST | @ 73 days 8 hours 42 mins 2 secs ago
+ | Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 73 days 8 hours 42 mins 4 secs ago
| Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 73 days 9 hours 42 mins 3 secs ago
- | Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 04:14:02 2000 PST | @ 73 days 10 hours 42 mins 1 sec ago
| Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 73 days 14 hours 42 mins ago
+ | Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 73 days 18 hours 42 mins 2 secs ago
+ | Sat Jan 01 17:32:01 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 73 days 19 hours 42 mins 1 sec ago
| Sat Jan 01 17:32:01 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 365 days ago
| Sat Jan 01 17:32:01 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 366 days ago
- | Wed Mar 15 01:14:05 2000 PST | epoch | @ 11031 days 9 hours 14 mins 5 secs
- | Wed Mar 15 01:14:05 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 7 hours 42 mins 4 secs
- | Wed Mar 15 01:14:05 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 7 hours 42 mins 4 secs
- | Wed Mar 15 01:14:05 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 7 hours 42 mins 4 secs
- | Wed Mar 15 01:14:05 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 7 hours 42 mins 4 secs
- | Wed Mar 15 01:14:05 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 7 hours 42 mins 4 secs
- | Wed Mar 15 01:14:05 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 7 hours 42 mins 4 secs
- | Wed Mar 15 01:14:05 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 7 hours 42 mins 4 secs
- | Wed Mar 15 01:14:05 2000 PST | Wed Mar 15 01:14:05 2000 PST | @ 0
- | Wed Mar 15 01:14:05 2000 PST | Wed Mar 15 02:14:03 2000 PST | @ 59 mins 58 secs ago
- | Wed Mar 15 01:14:05 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 1 hour 59 mins 59 secs ago
- | Wed Mar 15 01:14:05 2000 PST | Wed Mar 15 04:14:02 2000 PST | @ 2 hours 59 mins 57 secs ago
- | Wed Mar 15 01:14:05 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 6 hours 59 mins 56 secs ago
- | Wed Mar 15 01:14:05 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 16 hours 17 mins 56 secs ago
- | Wed Mar 15 01:14:05 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 16 hours 17 mins 56 secs ago
- | Wed Mar 15 02:14:03 2000 PST | epoch | @ 11031 days 10 hours 14 mins 3 secs
- | Wed Mar 15 02:14:03 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 8 hours 42 mins 2 secs
- | Wed Mar 15 02:14:03 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 8 hours 42 mins 2 secs
- | Wed Mar 15 02:14:03 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 8 hours 42 mins 2 secs
- | Wed Mar 15 02:14:03 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 8 hours 42 mins 2 secs
- | Wed Mar 15 02:14:03 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 8 hours 42 mins 2 secs
- | Wed Mar 15 02:14:03 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 8 hours 42 mins 2 secs
- | Wed Mar 15 02:14:03 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 8 hours 42 mins 2 secs
- | Wed Mar 15 02:14:03 2000 PST | Wed Mar 15 01:14:05 2000 PST | @ 59 mins 58 secs
- | Wed Mar 15 02:14:03 2000 PST | Wed Mar 15 02:14:03 2000 PST | @ 0
- | Wed Mar 15 02:14:03 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 1 hour 1 sec ago
- | Wed Mar 15 02:14:03 2000 PST | Wed Mar 15 04:14:02 2000 PST | @ 1 hour 59 mins 59 secs ago
- | Wed Mar 15 02:14:03 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 5 hours 59 mins 58 secs ago
- | Wed Mar 15 02:14:03 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 15 hours 17 mins 58 secs ago
- | Wed Mar 15 02:14:03 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 15 hours 17 mins 58 secs ago
- | Wed Mar 15 03:14:04 2000 PST | epoch | @ 11031 days 11 hours 14 mins 4 secs
+ | Sat Jan 01 17:32:01 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 629 days 23 hours 47 mins 19 secs ago
+ | Wed Mar 15 02:14:05 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 2 hours 14 mins 5 secs
+ | Wed Mar 15 02:14:05 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 8 hours 42 mins 4 secs
+ | Wed Mar 15 02:14:05 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 8 hours 42 mins 4 secs
+ | Wed Mar 15 02:14:05 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 8 hours 42 mins 4 secs
+ | Wed Mar 15 02:14:05 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 8 hours 42 mins 4 secs
+ | Wed Mar 15 02:14:05 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 8 hours 42 mins 4 secs
+ | Wed Mar 15 02:14:05 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 8 hours 42 mins 4 secs
+ | Wed Mar 15 02:14:05 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 8 hours 42 mins 4 secs
+ | Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 0
+ | Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 59 mins 59 secs ago
+ | Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 5 hours 59 mins 56 secs ago
+ | Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 9 hours 59 mins 58 secs ago
+ | Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 10 hours 59 mins 57 secs ago
+ | Wed Mar 15 02:14:05 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 15 hours 17 mins 56 secs ago
+ | Wed Mar 15 02:14:05 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 15 hours 17 mins 56 secs ago
+ | Wed Mar 15 02:14:05 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 15 hours 5 mins 15 secs ago
+ | Wed Mar 15 03:14:04 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 3 hours 14 mins 4 secs
| Wed Mar 15 03:14:04 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 9 hours 42 mins 3 secs
| Wed Mar 15 03:14:04 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 9 hours 42 mins 3 secs
| Wed Mar 15 03:14:04 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 9 hours 42 mins 3 secs
| Wed Mar 15 03:14:04 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 9 hours 42 mins 3 secs
| Wed Mar 15 03:14:04 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 9 hours 42 mins 3 secs
| Wed Mar 15 03:14:04 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 9 hours 42 mins 3 secs
- | Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 01:14:05 2000 PST | @ 1 hour 59 mins 59 secs
- | Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 02:14:03 2000 PST | @ 1 hour 1 sec
+ | Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 59 mins 59 secs
| Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 0
- | Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 04:14:02 2000 PST | @ 59 mins 58 secs ago
| Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 4 hours 59 mins 57 secs ago
+ | Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 8 hours 59 mins 59 secs ago
+ | Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 9 hours 59 mins 58 secs ago
| Wed Mar 15 03:14:04 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 14 hours 17 mins 57 secs ago
| Wed Mar 15 03:14:04 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 14 hours 17 mins 57 secs ago
- | Wed Mar 15 04:14:02 2000 PST | epoch | @ 11031 days 12 hours 14 mins 2 secs
- | Wed Mar 15 04:14:02 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 10 hours 42 mins 1 sec
- | Wed Mar 15 04:14:02 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 10 hours 42 mins 1 sec
- | Wed Mar 15 04:14:02 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 10 hours 42 mins 1 sec
- | Wed Mar 15 04:14:02 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 10 hours 42 mins 1 sec
- | Wed Mar 15 04:14:02 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 10 hours 42 mins 1 sec
- | Wed Mar 15 04:14:02 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 10 hours 42 mins 1 sec
- | Wed Mar 15 04:14:02 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 10 hours 42 mins 1 sec
- | Wed Mar 15 04:14:02 2000 PST | Wed Mar 15 01:14:05 2000 PST | @ 2 hours 59 mins 57 secs
- | Wed Mar 15 04:14:02 2000 PST | Wed Mar 15 02:14:03 2000 PST | @ 1 hour 59 mins 59 secs
- | Wed Mar 15 04:14:02 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 59 mins 58 secs
- | Wed Mar 15 04:14:02 2000 PST | Wed Mar 15 04:14:02 2000 PST | @ 0
- | Wed Mar 15 04:14:02 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 3 hours 59 mins 59 secs ago
- | Wed Mar 15 04:14:02 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 13 hours 17 mins 59 secs ago
- | Wed Mar 15 04:14:02 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 13 hours 17 mins 59 secs ago
- | Wed Mar 15 08:14:01 2000 PST | epoch | @ 11031 days 16 hours 14 mins 1 sec
+ | Wed Mar 15 03:14:04 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 14 hours 5 mins 16 secs ago
+ | Wed Mar 15 08:14:01 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 8 hours 14 mins 1 sec
| Wed Mar 15 08:14:01 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 14 hours 42 mins
| Wed Mar 15 08:14:01 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 14 hours 42 mins
| Wed Mar 15 08:14:01 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 14 hours 42 mins
| Wed Mar 15 08:14:01 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 14 hours 42 mins
| Wed Mar 15 08:14:01 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 14 hours 42 mins
| Wed Mar 15 08:14:01 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 14 hours 42 mins
- | Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 01:14:05 2000 PST | @ 6 hours 59 mins 56 secs
- | Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 02:14:03 2000 PST | @ 5 hours 59 mins 58 secs
+ | Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 5 hours 59 mins 56 secs
| Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 4 hours 59 mins 57 secs
- | Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 04:14:02 2000 PST | @ 3 hours 59 mins 59 secs
| Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 0
+ | Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 4 hours 2 secs ago
+ | Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 5 hours 1 sec ago
| Wed Mar 15 08:14:01 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 9 hours 18 mins ago
| Wed Mar 15 08:14:01 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 9 hours 18 mins ago
- | Sun Dec 31 17:32:01 2000 PST | epoch | @ 11323 days 1 hour 32 mins 1 sec
+ | Wed Mar 15 08:14:01 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 9 hours 5 mins 19 secs ago
+ | Wed Mar 15 12:14:03 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 12 hours 14 mins 3 secs
+ | Wed Mar 15 12:14:03 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 18 hours 42 mins 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 18 hours 42 mins 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 18 hours 42 mins 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 18 hours 42 mins 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 18 hours 42 mins 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 18 hours 42 mins 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 18 hours 42 mins 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 9 hours 59 mins 58 secs
+ | Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 8 hours 59 mins 59 secs
+ | Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 4 hours 2 secs
+ | Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 0
+ | Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 59 mins 59 secs ago
+ | Wed Mar 15 12:14:03 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 5 hours 17 mins 58 secs ago
+ | Wed Mar 15 12:14:03 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 5 hours 17 mins 58 secs ago
+ | Wed Mar 15 12:14:03 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 5 hours 5 mins 17 secs ago
+ | Wed Mar 15 13:14:02 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11031 days 13 hours 14 mins 2 secs
+ | Wed Mar 15 13:14:02 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1476 days 19 hours 42 mins 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1475 days 19 hours 42 mins 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1474 days 19 hours 42 mins 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Mon Dec 30 17:32:01 1996 PST | @ 1170 days 19 hours 42 mins 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1169 days 19 hours 42 mins 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 74 days 19 hours 42 mins 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 73 days 19 hours 42 mins 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 10 hours 59 mins 57 secs
+ | Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 9 hours 59 mins 58 secs
+ | Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 5 hours 1 sec
+ | Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 59 mins 59 secs
+ | Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 0
+ | Wed Mar 15 13:14:02 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 291 days 4 hours 17 mins 59 secs ago
+ | Wed Mar 15 13:14:02 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 292 days 4 hours 17 mins 59 secs ago
+ | Wed Mar 15 13:14:02 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 556 days 4 hours 5 mins 18 secs ago
+ | Sun Dec 31 17:32:01 2000 PST | Thu Jan 01 00:00:00 1970 PST | @ 11322 days 17 hours 32 mins 1 sec
| Sun Dec 31 17:32:01 2000 PST | Wed Feb 28 17:32:01 1996 PST | @ 1768 days
| Sun Dec 31 17:32:01 2000 PST | Thu Feb 29 17:32:01 1996 PST | @ 1767 days
| Sun Dec 31 17:32:01 2000 PST | Fri Mar 01 17:32:01 1996 PST | @ 1766 days
| Sun Dec 31 17:32:01 2000 PST | Tue Dec 31 17:32:01 1996 PST | @ 1461 days
| Sun Dec 31 17:32:01 2000 PST | Fri Dec 31 17:32:01 1999 PST | @ 366 days
| Sun Dec 31 17:32:01 2000 PST | Sat Jan 01 17:32:01 2000 PST | @ 365 days
- | Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 01:14:05 2000 PST | @ 291 days 16 hours 17 mins 56 secs
- | Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 02:14:03 2000 PST | @ 291 days 15 hours 17 mins 58 secs
+ | Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 02:14:05 2000 PST | @ 291 days 15 hours 17 mins 56 secs
| Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 03:14:04 2000 PST | @ 291 days 14 hours 17 mins 57 secs
- | Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 04:14:02 2000 PST | @ 291 days 13 hours 17 mins 59 secs
| Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 08:14:01 2000 PST | @ 291 days 9 hours 18 mins
+ | Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 12:14:03 2000 PST | @ 291 days 5 hours 17 mins 58 secs
+ | Sun Dec 31 17:32:01 2000 PST | Wed Mar 15 13:14:02 2000 PST | @ 291 days 4 hours 17 mins 59 secs
| Sun Dec 31 17:32:01 2000 PST | Sun Dec 31 17:32:01 2000 PST | @ 0
| Sun Dec 31 17:32:01 2000 PST | Mon Jan 01 17:32:01 2001 PST | @ 1 day ago
- | Mon Jan 01 17:32:01 2001 PST | epoch | @ 11324 days 1 hour 32 mins 1 sec
+ | Sun Dec 31 17:32:01 2000 PST | Sat Sep 22 18:19:20 2001 PDT | @ 264 days 23 hours 47 mins 19 secs ago
+ | Mon Jan 01 17:32:01 2001 PST | Thu Jan 01 00:00:00 1970 PST | @ 11323 days 17 hours 32 mins 1 sec
| Mon Jan 01 17:32:01 2001 PST | Wed Feb 28 17:32:01 1996 PST | @ 1769 days
| Mon Jan 01 17:32:01 2001 PST | Thu Feb 29 17:32:01 1996 PST | @ 1768 days
| Mon Jan 01 17:32:01 2001 PST | Fri Mar 01 17:32:01 1996 PST | @ 1767 days
| Mon Jan 01 17:32:01 2001 PST | Tue Dec 31 17:32:01 1996 PST | @ 1462 days
| Mon Jan 01 17:32:01 2001 PST | Fri Dec 31 17:32:01 1999 PST | @ 367 days
| Mon Jan 01 17:32:01 2001 PST | Sat Jan 01 17:32:01 2000 PST | @ 366 days
- | Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 01:14:05 2000 PST | @ 292 days 16 hours 17 mins 56 secs
- | Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 02:14:03 2000 PST | @ 292 days 15 hours 17 mins 58 secs
+ | Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 02:14:05 2000 PST | @ 292 days 15 hours 17 mins 56 secs
| Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 03:14:04 2000 PST | @ 292 days 14 hours 17 mins 57 secs
- | Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 04:14:02 2000 PST | @ 292 days 13 hours 17 mins 59 secs
| Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 08:14:01 2000 PST | @ 292 days 9 hours 18 mins
+ | Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 12:14:03 2000 PST | @ 292 days 5 hours 17 mins 58 secs
+ | Mon Jan 01 17:32:01 2001 PST | Wed Mar 15 13:14:02 2000 PST | @ 292 days 4 hours 17 mins 59 secs
| Mon Jan 01 17:32:01 2001 PST | Sun Dec 31 17:32:01 2000 PST | @ 1 day
| Mon Jan 01 17:32:01 2001 PST | Mon Jan 01 17:32:01 2001 PST | @ 0
-(225 rows)
-
-SELECT '' as "54", d1 as timestamp,
+ | Mon Jan 01 17:32:01 2001 PST | Sat Sep 22 18:19:20 2001 PDT | @ 263 days 23 hours 47 mins 19 secs ago
+ | Sat Sep 22 18:19:20 2001 PDT | Thu Jan 01 00:00:00 1970 PST | @ 11587 days 17 hours 19 mins 20 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Wed Feb 28 17:32:01 1996 PST | @ 2032 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Thu Feb 29 17:32:01 1996 PST | @ 2031 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Fri Mar 01 17:32:01 1996 PST | @ 2030 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Mon Dec 30 17:32:01 1996 PST | @ 1726 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Tue Dec 31 17:32:01 1996 PST | @ 1725 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Fri Dec 31 17:32:01 1999 PST | @ 630 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Sat Jan 01 17:32:01 2000 PST | @ 629 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 02:14:05 2000 PST | @ 556 days 15 hours 5 mins 15 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 03:14:04 2000 PST | @ 556 days 14 hours 5 mins 16 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 08:14:01 2000 PST | @ 556 days 9 hours 5 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 12:14:03 2000 PST | @ 556 days 5 hours 5 mins 17 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Wed Mar 15 13:14:02 2000 PST | @ 556 days 4 hours 5 mins 18 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Sun Dec 31 17:32:01 2000 PST | @ 264 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Mon Jan 01 17:32:01 2001 PST | @ 263 days 23 hours 47 mins 19 secs
+ | Sat Sep 22 18:19:20 2001 PDT | Sat Sep 22 18:19:20 2001 PDT | @ 0
+(256 rows)
+
+SELECT '' as "55", d1 as timestamp,
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 TIMESTAMP_TBL
WHERE isfinite(d1) and d1 >= '1-jan-1900 GMT'
ORDER BY timestamp;
- 54 | timestamp | year | month | day | hour | minute | second
-----+---------------------------------+------+-------+-----+------+--------+----------
- | epoch | 1969 | 12 | 31 | 16 | 0 | 0
- | Wed Feb 28 17:32:01 1996 PST | 1996 | 2 | 28 | 17 | 32 | 1
- | Thu Feb 29 17:32:01 1996 PST | 1996 | 2 | 29 | 17 | 32 | 1
- | Fri Mar 01 17:32:01 1996 PST | 1996 | 3 | 1 | 17 | 32 | 1
- | Mon Dec 30 17:32:01 1996 PST | 1996 | 12 | 30 | 17 | 32 | 1
- | Tue Dec 31 17:32:01 1996 PST | 1996 | 12 | 31 | 17 | 32 | 1
- | Wed Jan 01 17:32:01 1997 PST | 1997 | 1 | 1 | 17 | 32 | 1
- | Thu Jan 02 00:00:00 1997 PST | 1997 | 1 | 2 | 0 | 0 | 0
- | Thu Jan 02 03:04:05 1997 PST | 1997 | 1 | 2 | 3 | 4 | 5
- | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
- | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
- | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
- | Mon Feb 10 17:32:00 1997 PST | 1997 | 2 | 10 | 17 | 32 | 0
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
- | Mon Feb 10 17:32:01 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 1997 PST | 1997 | 2 | 11 | 17 | 32 | 1
- | Wed Feb 12 17:32:01 1997 PST | 1997 | 2 | 12 | 17 | 32 | 1
- | Thu Feb 13 17:32:01 1997 PST | 1997 | 2 | 13 | 17 | 32 | 1
- | Fri Feb 14 17:32:01 1997 PST | 1997 | 2 | 14 | 17 | 32 | 1
- | Sat Feb 15 17:32:01 1997 PST | 1997 | 2 | 15 | 17 | 32 | 1
- | Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1
- | Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1
- | Fri Feb 28 17:32:01 1997 PST | 1997 | 2 | 28 | 17 | 32 | 1
- | Sat Mar 01 17:32:01 1997 PST | 1997 | 3 | 1 | 17 | 32 | 1
- | Tue Jun 10 17:32:01 1997 PDT | 1997 | 6 | 10 | 17 | 32 | 1
- | Tue Jun 10 18:32:01 1997 PDT | 1997 | 6 | 10 | 18 | 32 | 1
- | Tue Dec 30 17:32:01 1997 PST | 1997 | 12 | 30 | 17 | 32 | 1
- | Wed Dec 31 17:32:01 1997 PST | 1997 | 12 | 31 | 17 | 32 | 1
- | Fri Dec 31 17:32:01 1999 PST | 1999 | 12 | 31 | 17 | 32 | 1
- | Sat Jan 01 17:32:01 2000 PST | 2000 | 1 | 1 | 17 | 32 | 1
- | Wed Mar 15 01:14:05 2000 PST | 2000 | 3 | 15 | 1 | 14 | 5
- | Wed Mar 15 02:14:03 2000 PST | 2000 | 3 | 15 | 2 | 14 | 3
- | Wed Mar 15 03:14:04 2000 PST | 2000 | 3 | 15 | 3 | 14 | 4
- | Wed Mar 15 04:14:02 2000 PST | 2000 | 3 | 15 | 4 | 14 | 2
- | Wed Mar 15 08:14:01 2000 PST | 2000 | 3 | 15 | 8 | 14 | 1
- | Sun Dec 31 17:32:01 2000 PST | 2000 | 12 | 31 | 17 | 32 | 1
- | Mon Jan 01 17:32:01 2001 PST | 2001 | 1 | 1 | 17 | 32 | 1
- | Sat Feb 16 17:32:01 2097 | 2097 | 2 | 16 | 17 | 32 | 1
-(54 rows)
+ 55 | timestamp | year | month | day | hour | minute | second
+----+-----------------------------+------+-------+-----+------+--------+----------
+ | Thu Jan 01 00:00:00 1970 | 1969 | 12 | 31 | 16 | 0 | 0
+ | Wed Feb 28 17:32:01 1996 | 1996 | 2 | 28 | 9 | 32 | 1
+ | Thu Feb 29 17:32:01 1996 | 1996 | 2 | 29 | 9 | 32 | 1
+ | Fri Mar 01 17:32:01 1996 | 1996 | 3 | 1 | 9 | 32 | 1
+ | Mon Dec 30 17:32:01 1996 | 1996 | 12 | 30 | 9 | 32 | 1
+ | Tue Dec 31 17:32:01 1996 | 1996 | 12 | 31 | 9 | 32 | 1
+ | Wed Jan 01 17:32:01 1997 | 1997 | 1 | 1 | 9 | 32 | 1
+ | Thu Jan 02 00:00:00 1997 | 1997 | 1 | 1 | 16 | 0 | 0
+ | Thu Jan 02 03:04:05 1997 | 1997 | 1 | 1 | 19 | 4 | 5
+ | Mon Feb 10 17:32:00 1997 | 1997 | 2 | 10 | 9 | 32 | 0
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 9 | 32 | 1
+ | Mon Feb 10 17:32:01.00 1997 | 1997 | 2 | 10 | 9 | 32 | 1.000001
+ | Mon Feb 10 17:32:01.40 1997 | 1997 | 2 | 10 | 9 | 32 | 1.4
+ | Mon Feb 10 17:32:01.50 1997 | 1997 | 2 | 10 | 9 | 32 | 1.5
+ | Mon Feb 10 17:32:01.60 1997 | 1997 | 2 | 10 | 9 | 32 | 1.6
+ | Mon Feb 10 17:32:02.00 1997 | 1997 | 2 | 10 | 9 | 32 | 1.999999
+ | Tue Feb 11 17:32:01 1997 | 1997 | 2 | 11 | 9 | 32 | 1
+ | Wed Feb 12 17:32:01 1997 | 1997 | 2 | 12 | 9 | 32 | 1
+ | Thu Feb 13 17:32:01 1997 | 1997 | 2 | 13 | 9 | 32 | 1
+ | Fri Feb 14 17:32:01 1997 | 1997 | 2 | 14 | 9 | 32 | 1
+ | Sat Feb 15 17:32:01 1997 | 1997 | 2 | 15 | 9 | 32 | 1
+ | Sun Feb 16 17:32:01 1997 | 1997 | 2 | 16 | 9 | 32 | 1
+ | Sun Feb 16 17:32:01 1997 | 1997 | 2 | 16 | 9 | 32 | 1
+ | Fri Feb 28 17:32:01 1997 | 1997 | 2 | 28 | 9 | 32 | 1
+ | Sat Mar 01 17:32:01 1997 | 1997 | 3 | 1 | 9 | 32 | 1
+ | Tue Jun 10 17:32:01 1997 | 1997 | 6 | 10 | 10 | 32 | 1
+ | Tue Jun 10 18:32:01 1997 | 1997 | 6 | 10 | 11 | 32 | 1
+ | Tue Dec 30 17:32:01 1997 | 1997 | 12 | 30 | 9 | 32 | 1
+ | Wed Dec 31 17:32:01 1997 | 1997 | 12 | 31 | 9 | 32 | 1
+ | Fri Dec 31 17:32:01 1999 | 1999 | 12 | 31 | 9 | 32 | 1
+ | Sat Jan 01 17:32:01 2000 | 2000 | 1 | 1 | 9 | 32 | 1
+ | Wed Mar 15 02:14:05 2000 | 2000 | 3 | 14 | 18 | 14 | 5
+ | Wed Mar 15 03:14:04 2000 | 2000 | 3 | 14 | 19 | 14 | 4
+ | Wed Mar 15 08:14:01 2000 | 2000 | 3 | 15 | 0 | 14 | 1
+ | Wed Mar 15 12:14:03 2000 | 2000 | 3 | 15 | 4 | 14 | 3
+ | Wed Mar 15 13:14:02 2000 | 2000 | 3 | 15 | 5 | 14 | 2
+ | Sun Dec 31 17:32:01 2000 | 2000 | 12 | 31 | 9 | 32 | 1
+ | Mon Jan 01 17:32:01 2001 | 2001 | 1 | 1 | 9 | 32 | 1
+ | Sat Sep 22 18:19:20 2001 | 2001 | 9 | 22 | 11 | 19 | 20
+ | Sat Feb 16 17:32:01 2097 | 2097 | 2 | 16 | 17 | 32 | 1
+(55 rows)
--
-- abstime, reltime arithmetic
--
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
- WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
- < abstime 'Jan 14 14:00:00 1971'
+ WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1) < abstime 'Jan 14 14:00:00 1971'
ORDER BY abstime, reltime;
ten | abstime | reltime
-----+------------------------------+---------------
| Sat May 10 23:59:12 1947 PST | @ 5 hours
| Sat May 10 23:59:12 1947 PST | @ 10 days
| Sat May 10 23:59:12 1947 PST | @ 3 mons
- | epoch | @ 14 secs ago
- | epoch | @ 1 min
- | epoch | @ 5 hours
- | epoch | @ 10 days
- | epoch | @ 3 mons
+ | Wed Dec 31 16:00:00 1969 PST | @ 14 secs ago
+ | Wed Dec 31 16:00:00 1969 PST | @ 1 min
+ | Wed Dec 31 16:00:00 1969 PST | @ 5 hours
+ | Wed Dec 31 16:00:00 1969 PST | @ 10 days
+ | Wed Dec 31 16:00:00 1969 PST | @ 3 mons
(10 rows)
-- these four queries should return the same answer
-- therefore, should not show up in the results.
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
- < abstime 'Jan 14 14:00:00 1977';
+ < abstime 'Jan 14 14:00:00 1977';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
| Sat May 10 23:59:12 1947 PST
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
- < abstime 'Jan 14 14:00:00 1971';
+ < abstime 'Jan 14 14:00:00 1971';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
| Sat May 10 23:59:12 1947 PST
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
- < abstime 'Jan 14 14:00:00 1971';
+ < abstime 'Jan 14 14:00:00 1971';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
| Sat May 10 23:59:12 1947 PST
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
- < abstime 'Jan 14 14:00:00 1977';
+ < abstime 'Jan 14 14:00:00 1977';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
- | epoch
+ | Wed Dec 31 16:00:00 1969 PST
| Sat May 10 23:59:12 1947 PST
(3 rows)
--
-- Conversions
--
-SELECT '' AS "15", f1 AS timestamp, date( f1) AS date
+SELECT '' AS "16", f1 AS timestamp, date(f1) AS date
FROM TEMP_TIMESTAMP
WHERE f1 <> timestamp 'current'
ORDER BY date, timestamp;
- 15 | timestamp | date
+ 16 | timestamp | date
----+------------------------------+------------
- | epoch | 01-01-1970
+ | Thu Jan 01 00:00:00 1970 PST | 01-01-1970
| Wed Feb 28 17:32:01 1996 PST | 02-28-1996
| Thu Feb 29 17:32:01 1996 PST | 02-29-1996
| Fri Mar 01 17:32:01 1996 PST | 03-01-1996
| Tue Dec 31 17:32:01 1996 PST | 12-31-1996
| Fri Dec 31 17:32:01 1999 PST | 12-31-1999
| Sat Jan 01 17:32:01 2000 PST | 01-01-2000
- | Wed Mar 15 01:14:05 2000 PST | 03-15-2000
- | Wed Mar 15 02:14:03 2000 PST | 03-15-2000
+ | Wed Mar 15 02:14:05 2000 PST | 03-15-2000
| Wed Mar 15 03:14:04 2000 PST | 03-15-2000
- | Wed Mar 15 04:14:02 2000 PST | 03-15-2000
| Wed Mar 15 08:14:01 2000 PST | 03-15-2000
+ | Wed Mar 15 12:14:03 2000 PST | 03-15-2000
+ | Wed Mar 15 13:14:02 2000 PST | 03-15-2000
| Sun Dec 31 17:32:01 2000 PST | 12-31-2000
| Mon Jan 01 17:32:01 2001 PST | 01-01-2001
-(15 rows)
+ | Sat Sep 22 18:19:20 2001 PDT | 09-22-2001
+(16 rows)
-SELECT '' AS "15", f1 AS timestamp, abstime( f1) AS abstime
+SELECT '' AS "16", f1 AS timestamp, abstime(f1) AS abstime
FROM TEMP_TIMESTAMP
ORDER BY abstime;
- 15 | timestamp | abstime
+ 16 | timestamp | abstime
----+------------------------------+------------------------------
- | epoch | epoch
+ | Thu Jan 01 00:00:00 1970 PST | Thu Jan 01 00:00:00 1970 PST
| Wed Feb 28 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST
| Thu Feb 29 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST
| Fri Mar 01 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST
| Tue Dec 31 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST
| Fri Dec 31 17:32:01 1999 PST | Fri Dec 31 17:32:01 1999 PST
| Sat Jan 01 17:32:01 2000 PST | Sat Jan 01 17:32:01 2000 PST
- | Wed Mar 15 01:14:05 2000 PST | Wed Mar 15 01:14:05 2000 PST
- | Wed Mar 15 02:14:03 2000 PST | Wed Mar 15 02:14:03 2000 PST
+ | Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 02:14:05 2000 PST
| Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 03:14:04 2000 PST
- | Wed Mar 15 04:14:02 2000 PST | Wed Mar 15 04:14:02 2000 PST
| Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 08:14:01 2000 PST
+ | Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 12:14:03 2000 PST
+ | Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 13:14:02 2000 PST
| Sun Dec 31 17:32:01 2000 PST | Sun Dec 31 17:32:01 2000 PST
| Mon Jan 01 17:32:01 2001 PST | Mon Jan 01 17:32:01 2001 PST
-(15 rows)
+ | Sat Sep 22 18:19:20 2001 PDT | Sat Sep 22 18:19:20 2001 PDT
+(16 rows)
-SELECT '' AS four, f1 AS abstime, date( f1) AS date
+SELECT '' AS four, f1 AS abstime, date(f1) AS date
FROM ABSTIME_TBL
WHERE isfinite(f1) AND f1 <> abstime 'current'
ORDER BY date, abstime;
four | abstime | date
------+------------------------------+------------
| Sat May 10 23:59:12 1947 PST | 05-10-1947
- | epoch | 01-01-1970
+ | Wed Dec 31 16:00:00 1969 PST | 12-31-1969
| Sun Jan 14 03:14:21 1973 PST | 01-14-1973
| Mon May 01 00:30:30 1995 PDT | 05-01-1995
(4 rows)
-SELECT '' AS five, d1 AS timestamp, abstime(d1) AS abstime
+SELECT '' AS two, d1 AS timestamp, abstime(d1) AS abstime
FROM TIMESTAMP_TBL WHERE NOT isfinite(d1);
- five | timestamp | abstime
-------+-----------+-----------
- | invalid | invalid
- | -infinity | -infinity
- | infinity | infinity
- | invalid | invalid
- | invalid | invalid
-(5 rows)
+ two | timestamp | abstime
+-----+-----------+-----------
+ | -infinity | -infinity
+ | infinity | infinity
+(2 rows)
SELECT '' AS three, f1 as abstime, timestamp(f1) AS timestamp
FROM ABSTIME_TBL WHERE NOT isfinite(f1);
- three | abstime | timestamp
--------+-----------+-----------
- | infinity | infinity
- | -infinity | -infinity
- | invalid | invalid
-(3 rows)
-
-SELECT '' AS ten, f1 AS interval, reltime( f1) AS reltime
+ERROR: Unable to convert abstime 'invalid' to timestamp
+SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime
FROM INTERVAL_TBL;
ten | interval | reltime
-----+-------------------------------+-------------------------------
| @ 5 mons 12 hours | @ 5 mons 12 hours
(10 rows)
-SELECT '' AS six, f1 as reltime, interval( f1) AS interval
+SELECT '' AS six, f1 as reltime, interval(f1) AS interval
FROM RELTIME_TBL;
six | reltime | interval
-----+---------------+---------------
SET DateStyle TO 'US,Postgres';
SHOW DateStyle;
NOTICE: DateStyle is Postgres with US (NonEuropean) conventions
-SELECT '' AS "66", d1 AS us_postgres FROM TIMESTAMP_TBL;
- 66 | us_postgres
-----+---------------------------------
- | invalid
+SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
+ 64 | us_postgres
+----+-----------------------------
| -infinity
| infinity
- | epoch
- | Mon Feb 10 17:32:01 1997 PST
- | invalid
- | invalid
- | Mon Feb 10 17:32:01.00 1997 PST
- | Mon Feb 10 17:32:02.00 1997 PST
- | Mon Feb 10 17:32:01.40 1997 PST
- | Mon Feb 10 17:32:01.50 1997 PST
- | Mon Feb 10 17:32:01.60 1997 PST
- | Thu Jan 02 00:00:00 1997 PST
- | Thu Jan 02 03:04:05 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Jun 10 17:32:01 1997 PDT
- | Wed Mar 15 08:14:01 2000 PST
- | Wed Mar 15 04:14:02 2000 PST
- | Wed Mar 15 02:14:03 2000 PST
- | Wed Mar 15 03:14:04 2000 PST
- | Wed Mar 15 01:14:05 2000 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:00 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Tue Jun 10 18:32:01 1997 PDT
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Feb 11 17:32:01 1997 PST
- | Wed Feb 12 17:32:01 1997 PST
- | Thu Feb 13 17:32:01 1997 PST
- | Fri Feb 14 17:32:01 1997 PST
- | Sat Feb 15 17:32:01 1997 PST
- | Sun Feb 16 17:32:01 1997 PST
+ | Thu Jan 01 00:00:00 1970
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01.00 1997
+ | Mon Feb 10 17:32:02.00 1997
+ | Mon Feb 10 17:32:01.40 1997
+ | Mon Feb 10 17:32:01.50 1997
+ | Mon Feb 10 17:32:01.60 1997
+ | Thu Jan 02 00:00:00 1997
+ | Thu Jan 02 03:04:05 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 17:32:01 1997
+ | Sat Sep 22 18:19:20 2001
+ | Wed Mar 15 08:14:01 2000
+ | Wed Mar 15 13:14:02 2000
+ | Wed Mar 15 12:14:03 2000
+ | Wed Mar 15 03:14:04 2000
+ | Wed Mar 15 02:14:05 2000
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:00 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 18:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Feb 11 17:32:01 1997
+ | Wed Feb 12 17:32:01 1997
+ | Thu Feb 13 17:32:01 1997
+ | Fri Feb 14 17:32:01 1997
+ | Sat Feb 15 17:32:01 1997
+ | Sun Feb 16 17:32:01 1997
| Tue Feb 16 17:32 0097 BC
| Sat Feb 16 17:32:01 0097
| Thu Feb 16 17:32:01 0597
| Sat Feb 16 17:32:01 1697
| Thu Feb 16 17:32:01 1797
| Tue Feb 16 17:32:01 1897
- | Sun Feb 16 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997
| Sat Feb 16 17:32:01 2097
- | Wed Feb 28 17:32:01 1996 PST
- | Thu Feb 29 17:32:01 1996 PST
- | Fri Mar 01 17:32:01 1996 PST
- | Mon Dec 30 17:32:01 1996 PST
- | Tue Dec 31 17:32:01 1996 PST
- | Wed Jan 01 17:32:01 1997 PST
- | Fri Feb 28 17:32:01 1997 PST
- | Sat Mar 01 17:32:01 1997 PST
- | Tue Dec 30 17:32:01 1997 PST
- | Wed Dec 31 17:32:01 1997 PST
- | Fri Dec 31 17:32:01 1999 PST
- | Sat Jan 01 17:32:01 2000 PST
- | Sun Dec 31 17:32:01 2000 PST
- | Mon Jan 01 17:32:01 2001 PST
-(66 rows)
-
-SELECT '' AS eight, f1 AS us_postgres FROM ABSTIME_TBL;
- eight | us_postgres
+ | Wed Feb 28 17:32:01 1996
+ | Thu Feb 29 17:32:01 1996
+ | Fri Mar 01 17:32:01 1996
+ | Mon Dec 30 17:32:01 1996
+ | Tue Dec 31 17:32:01 1996
+ | Wed Jan 01 17:32:01 1997
+ | Fri Feb 28 17:32:01 1997
+ | Sat Mar 01 17:32:01 1997
+ | Tue Dec 30 17:32:01 1997
+ | Wed Dec 31 17:32:01 1997
+ | Fri Dec 31 17:32:01 1999
+ | Sat Jan 01 17:32:01 2000
+ | Sun Dec 31 17:32:01 2000
+ | Mon Jan 01 17:32:01 2001
+(64 rows)
+
+SELECT '' AS seven, f1 AS us_postgres FROM ABSTIME_TBL;
+ seven | us_postgres
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
- | epoch
- | current
+ | Wed Dec 31 16:00:00 1969 PST
| infinity
| -infinity
| Sat May 10 23:59:12 1947 PST
| invalid
-(8 rows)
+(7 rows)
SET DateStyle TO 'US,ISO';
-SELECT '' AS "66", d1 AS us_iso FROM TIMESTAMP_TBL;
- 66 | us_iso
-----+---------------------------
- | invalid
+SELECT '' AS "64", d1 AS us_iso FROM TIMESTAMP_TBL;
+ 64 | us_iso
+----+------------------------
| -infinity
| infinity
- | epoch
- | 1997-02-10 17:32:01-08
- | invalid
- | invalid
- | 1997-02-10 17:32:01.00-08
- | 1997-02-10 17:32:02.00-08
- | 1997-02-10 17:32:01.40-08
- | 1997-02-10 17:32:01.50-08
- | 1997-02-10 17:32:01.60-08
- | 1997-01-02 00:00:00-08
- | 1997-01-02 03:04:05-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-06-10 17:32:01-07
- | 2000-03-15 08:14:01-08
- | 2000-03-15 04:14:02-08
- | 2000-03-15 02:14:03-08
- | 2000-03-15 03:14:04-08
- | 2000-03-15 01:14:05-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:00-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 09:32:01-08
- | 1997-02-10 09:32:01-08
- | 1997-02-10 09:32:01-08
- | 1997-06-10 18:32:01-07
- | 1997-02-10 17:32:01-08
- | 1997-02-11 17:32:01-08
- | 1997-02-12 17:32:01-08
- | 1997-02-13 17:32:01-08
- | 1997-02-14 17:32:01-08
- | 1997-02-15 17:32:01-08
- | 1997-02-16 17:32:01-08
+ | 1970-01-01 00:00:00
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01.00
+ | 1997-02-10 17:32:02.00
+ | 1997-02-10 17:32:01.40
+ | 1997-02-10 17:32:01.50
+ | 1997-02-10 17:32:01.60
+ | 1997-01-02 00:00:00
+ | 1997-01-02 03:04:05
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-06-10 17:32:01
+ | 2001-09-22 18:19:20
+ | 2000-03-15 08:14:01
+ | 2000-03-15 13:14:02
+ | 2000-03-15 12:14:03
+ | 2000-03-15 03:14:04
+ | 2000-03-15 02:14:05
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:00
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-06-10 18:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-11 17:32:01
+ | 1997-02-12 17:32:01
+ | 1997-02-13 17:32:01
+ | 1997-02-14 17:32:01
+ | 1997-02-15 17:32:01
+ | 1997-02-16 17:32:01
| 0097-02-16 17:32 BC
| 0097-02-16 17:32:01
| 0597-02-16 17:32:01
| 1697-02-16 17:32:01
| 1797-02-16 17:32:01
| 1897-02-16 17:32:01
- | 1997-02-16 17:32:01-08
+ | 1997-02-16 17:32:01
| 2097-02-16 17:32:01
- | 1996-02-28 17:32:01-08
- | 1996-02-29 17:32:01-08
- | 1996-03-01 17:32:01-08
- | 1996-12-30 17:32:01-08
- | 1996-12-31 17:32:01-08
- | 1997-01-01 17:32:01-08
- | 1997-02-28 17:32:01-08
- | 1997-03-01 17:32:01-08
- | 1997-12-30 17:32:01-08
- | 1997-12-31 17:32:01-08
- | 1999-12-31 17:32:01-08
- | 2000-01-01 17:32:01-08
- | 2000-12-31 17:32:01-08
- | 2001-01-01 17:32:01-08
-(66 rows)
-
-SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
- eight | us_iso
+ | 1996-02-28 17:32:01
+ | 1996-02-29 17:32:01
+ | 1996-03-01 17:32:01
+ | 1996-12-30 17:32:01
+ | 1996-12-31 17:32:01
+ | 1997-01-01 17:32:01
+ | 1997-02-28 17:32:01
+ | 1997-03-01 17:32:01
+ | 1997-12-30 17:32:01
+ | 1997-12-31 17:32:01
+ | 1999-12-31 17:32:01
+ | 2000-01-01 17:32:01
+ | 2000-12-31 17:32:01
+ | 2001-01-01 17:32:01
+(64 rows)
+
+SELECT '' AS seven, f1 AS us_iso FROM ABSTIME_TBL;
+ seven | us_iso
-------+------------------------
| 1973-01-14 03:14:21-08
| 1995-05-01 00:30:30-07
- | epoch
- | current
+ | 1969-12-31 16:00:00-08
| infinity
| -infinity
| 1947-05-10 23:59:12-08
| invalid
-(8 rows)
+(7 rows)
SET DateStyle TO 'US,SQL';
SHOW DateStyle;
NOTICE: DateStyle is SQL with US (NonEuropean) conventions
-SELECT '' AS "66", d1 AS us_sql FROM TIMESTAMP_TBL;
- 66 | us_sql
-----+----------------------------
- | invalid
+SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
+ 64 | us_sql
+----+------------------------
| -infinity
| infinity
- | epoch
- | 02/10/1997 17:32:01.00 PST
- | invalid
- | invalid
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:02.00 PST
- | 02/10/1997 17:32:01.40 PST
- | 02/10/1997 17:32:01.50 PST
- | 02/10/1997 17:32:01.60 PST
- | 01/02/1997 00:00:00.00 PST
- | 01/02/1997 03:04:05.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 06/10/1997 17:32:01.00 PDT
- | 03/15/2000 08:14:01.00 PST
- | 03/15/2000 04:14:02.00 PST
- | 03/15/2000 02:14:03.00 PST
- | 03/15/2000 03:14:04.00 PST
- | 03/15/2000 01:14:05.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:00.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 17:32:01.00 PST
- | 02/10/1997 09:32:01.00 PST
- | 02/10/1997 09:32:01.00 PST
- | 02/10/1997 09:32:01.00 PST
- | 06/10/1997 18:32:01.00 PDT
- | 02/10/1997 17:32:01.00 PST
- | 02/11/1997 17:32:01.00 PST
- | 02/12/1997 17:32:01.00 PST
- | 02/13/1997 17:32:01.00 PST
- | 02/14/1997 17:32:01.00 PST
- | 02/15/1997 17:32:01.00 PST
- | 02/16/1997 17:32:01.00 PST
+ | 01/01/1970 00:00:00.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:02.00
+ | 02/10/1997 17:32:01.40
+ | 02/10/1997 17:32:01.50
+ | 02/10/1997 17:32:01.60
+ | 01/02/1997 00:00:00.00
+ | 01/02/1997 03:04:05.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 06/10/1997 17:32:01.00
+ | 09/22/2001 18:19:20.00
+ | 03/15/2000 08:14:01.00
+ | 03/15/2000 13:14:02.00
+ | 03/15/2000 12:14:03.00
+ | 03/15/2000 03:14:04.00
+ | 03/15/2000 02:14:05.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:00.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 06/10/1997 18:32:01.00
+ | 02/10/1997 17:32:01.00
+ | 02/11/1997 17:32:01.00
+ | 02/12/1997 17:32:01.00
+ | 02/13/1997 17:32:01.00
+ | 02/14/1997 17:32:01.00
+ | 02/15/1997 17:32:01.00
+ | 02/16/1997 17:32:01.00
| 02/16/0097 17:32 BC
| 02/16/0097 17:32:01.00
| 02/16/0597 17:32:01.00
| 02/16/1697 17:32:01.00
| 02/16/1797 17:32:01.00
| 02/16/1897 17:32:01.00
- | 02/16/1997 17:32:01.00 PST
+ | 02/16/1997 17:32:01.00
| 02/16/2097 17:32:01.00
- | 02/28/1996 17:32:01.00 PST
- | 02/29/1996 17:32:01.00 PST
- | 03/01/1996 17:32:01.00 PST
- | 12/30/1996 17:32:01.00 PST
- | 12/31/1996 17:32:01.00 PST
- | 01/01/1997 17:32:01.00 PST
- | 02/28/1997 17:32:01.00 PST
- | 03/01/1997 17:32:01.00 PST
- | 12/30/1997 17:32:01.00 PST
- | 12/31/1997 17:32:01.00 PST
- | 12/31/1999 17:32:01.00 PST
- | 01/01/2000 17:32:01.00 PST
- | 12/31/2000 17:32:01.00 PST
- | 01/01/2001 17:32:01.00 PST
-(66 rows)
-
-SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
- eight | us_sql
+ | 02/28/1996 17:32:01.00
+ | 02/29/1996 17:32:01.00
+ | 03/01/1996 17:32:01.00
+ | 12/30/1996 17:32:01.00
+ | 12/31/1996 17:32:01.00
+ | 01/01/1997 17:32:01.00
+ | 02/28/1997 17:32:01.00
+ | 03/01/1997 17:32:01.00
+ | 12/30/1997 17:32:01.00
+ | 12/31/1997 17:32:01.00
+ | 12/31/1999 17:32:01.00
+ | 01/01/2000 17:32:01.00
+ | 12/31/2000 17:32:01.00
+ | 01/01/2001 17:32:01.00
+(64 rows)
+
+SELECT '' AS seven, f1 AS us_sql FROM ABSTIME_TBL;
+ seven | us_sql
-------+----------------------------
| 01/14/1973 03:14:21.00 PST
| 05/01/1995 00:30:30.00 PDT
- | epoch
- | current
+ | 12/31/1969 16:00:00.00 PST
| infinity
| -infinity
| 05/10/1947 23:59:12.00 PST
| invalid
-(8 rows)
+(7 rows)
SET DateStyle TO 'European,Postgres';
SHOW DateStyle;
1
(1 row)
-SELECT '' AS "67", d1 AS european_postgres FROM TIMESTAMP_TBL;
- 67 | european_postgres
-----+---------------------------------
- | invalid
+SELECT '' AS "65", d1 AS european_postgres FROM TIMESTAMP_TBL;
+ 65 | european_postgres
+----+-----------------------------
| -infinity
| infinity
- | epoch
- | Mon 10 Feb 17:32:01 1997 PST
- | invalid
- | invalid
- | Mon 10 Feb 17:32:01.00 1997 PST
- | Mon 10 Feb 17:32:02.00 1997 PST
- | Mon 10 Feb 17:32:01.40 1997 PST
- | Mon 10 Feb 17:32:01.50 1997 PST
- | Mon 10 Feb 17:32:01.60 1997 PST
- | Thu 02 Jan 00:00:00 1997 PST
- | Thu 02 Jan 03:04:05 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Tue 10 Jun 17:32:01 1997 PDT
- | Wed 15 Mar 08:14:01 2000 PST
- | Wed 15 Mar 04:14:02 2000 PST
- | Wed 15 Mar 02:14:03 2000 PST
- | Wed 15 Mar 03:14:04 2000 PST
- | Wed 15 Mar 01:14:05 2000 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:00 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 17:32:01 1997 PST
- | Mon 10 Feb 09:32:01 1997 PST
- | Mon 10 Feb 09:32:01 1997 PST
- | Mon 10 Feb 09:32:01 1997 PST
- | Tue 10 Jun 18:32:01 1997 PDT
- | Mon 10 Feb 17:32:01 1997 PST
- | Tue 11 Feb 17:32:01 1997 PST
- | Wed 12 Feb 17:32:01 1997 PST
- | Thu 13 Feb 17:32:01 1997 PST
- | Fri 14 Feb 17:32:01 1997 PST
- | Sat 15 Feb 17:32:01 1997 PST
- | Sun 16 Feb 17:32:01 1997 PST
+ | Thu 01 Jan 00:00:00 1970
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01.00 1997
+ | Mon 10 Feb 17:32:02.00 1997
+ | Mon 10 Feb 17:32:01.40 1997
+ | Mon 10 Feb 17:32:01.50 1997
+ | Mon 10 Feb 17:32:01.60 1997
+ | Thu 02 Jan 00:00:00 1997
+ | Thu 02 Jan 03:04:05 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Tue 10 Jun 17:32:01 1997
+ | Sat 22 Sep 18:19:20 2001
+ | Wed 15 Mar 08:14:01 2000
+ | Wed 15 Mar 13:14:02 2000
+ | Wed 15 Mar 12:14:03 2000
+ | Wed 15 Mar 03:14:04 2000
+ | Wed 15 Mar 02:14:05 2000
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:00 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Tue 10 Jun 18:32:01 1997
+ | Mon 10 Feb 17:32:01 1997
+ | Tue 11 Feb 17:32:01 1997
+ | Wed 12 Feb 17:32:01 1997
+ | Thu 13 Feb 17:32:01 1997
+ | Fri 14 Feb 17:32:01 1997
+ | Sat 15 Feb 17:32:01 1997
+ | Sun 16 Feb 17:32:01 1997
| Tue 16 Feb 17:32 0097 BC
| Sat 16 Feb 17:32:01 0097
| Thu 16 Feb 17:32:01 0597
| Sat 16 Feb 17:32:01 1697
| Thu 16 Feb 17:32:01 1797
| Tue 16 Feb 17:32:01 1897
- | Sun 16 Feb 17:32:01 1997 PST
+ | Sun 16 Feb 17:32:01 1997
| Sat 16 Feb 17:32:01 2097
- | Wed 28 Feb 17:32:01 1996 PST
- | Thu 29 Feb 17:32:01 1996 PST
- | Fri 01 Mar 17:32:01 1996 PST
- | Mon 30 Dec 17:32:01 1996 PST
- | Tue 31 Dec 17:32:01 1996 PST
- | Wed 01 Jan 17:32:01 1997 PST
- | Fri 28 Feb 17:32:01 1997 PST
- | Sat 01 Mar 17:32:01 1997 PST
- | Tue 30 Dec 17:32:01 1997 PST
- | Wed 31 Dec 17:32:01 1997 PST
- | Fri 31 Dec 17:32:01 1999 PST
- | Sat 01 Jan 17:32:01 2000 PST
- | Sun 31 Dec 17:32:01 2000 PST
- | Mon 01 Jan 17:32:01 2001 PST
- | Thu 13 Jun 00:00:00 1957 PDT
-(67 rows)
-
-SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
- eight | european_postgres
+ | Wed 28 Feb 17:32:01 1996
+ | Thu 29 Feb 17:32:01 1996
+ | Fri 01 Mar 17:32:01 1996
+ | Mon 30 Dec 17:32:01 1996
+ | Tue 31 Dec 17:32:01 1996
+ | Wed 01 Jan 17:32:01 1997
+ | Fri 28 Feb 17:32:01 1997
+ | Sat 01 Mar 17:32:01 1997
+ | Tue 30 Dec 17:32:01 1997
+ | Wed 31 Dec 17:32:01 1997
+ | Fri 31 Dec 17:32:01 1999
+ | Sat 01 Jan 17:32:01 2000
+ | Sun 31 Dec 17:32:01 2000
+ | Mon 01 Jan 17:32:01 2001
+ | Thu 13 Jun 00:00:00 1957
+(65 rows)
+
+SELECT '' AS seven, f1 AS european_postgres FROM ABSTIME_TBL;
+ seven | european_postgres
-------+------------------------------
| Sun 14 Jan 03:14:21 1973 PST
| Mon 01 May 00:30:30 1995 PDT
- | epoch
- | current
+ | Wed 31 Dec 16:00:00 1969 PST
| infinity
| -infinity
| Sat 10 May 23:59:12 1947 PST
| invalid
-(8 rows)
+(7 rows)
SET DateStyle TO 'European,ISO';
SHOW DateStyle;
NOTICE: DateStyle is ISO with European conventions
-SELECT '' AS "67", d1 AS european_iso FROM TIMESTAMP_TBL;
- 67 | european_iso
-----+---------------------------
- | invalid
+SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
+ 65 | european_iso
+----+------------------------
| -infinity
| infinity
- | epoch
- | 1997-02-10 17:32:01-08
- | invalid
- | invalid
- | 1997-02-10 17:32:01.00-08
- | 1997-02-10 17:32:02.00-08
- | 1997-02-10 17:32:01.40-08
- | 1997-02-10 17:32:01.50-08
- | 1997-02-10 17:32:01.60-08
- | 1997-01-02 00:00:00-08
- | 1997-01-02 03:04:05-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-06-10 17:32:01-07
- | 2000-03-15 08:14:01-08
- | 2000-03-15 04:14:02-08
- | 2000-03-15 02:14:03-08
- | 2000-03-15 03:14:04-08
- | 2000-03-15 01:14:05-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:00-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 17:32:01-08
- | 1997-02-10 09:32:01-08
- | 1997-02-10 09:32:01-08
- | 1997-02-10 09:32:01-08
- | 1997-06-10 18:32:01-07
- | 1997-02-10 17:32:01-08
- | 1997-02-11 17:32:01-08
- | 1997-02-12 17:32:01-08
- | 1997-02-13 17:32:01-08
- | 1997-02-14 17:32:01-08
- | 1997-02-15 17:32:01-08
- | 1997-02-16 17:32:01-08
+ | 1970-01-01 00:00:00
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01.00
+ | 1997-02-10 17:32:02.00
+ | 1997-02-10 17:32:01.40
+ | 1997-02-10 17:32:01.50
+ | 1997-02-10 17:32:01.60
+ | 1997-01-02 00:00:00
+ | 1997-01-02 03:04:05
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-06-10 17:32:01
+ | 2001-09-22 18:19:20
+ | 2000-03-15 08:14:01
+ | 2000-03-15 13:14:02
+ | 2000-03-15 12:14:03
+ | 2000-03-15 03:14:04
+ | 2000-03-15 02:14:05
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:00
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-10 17:32:01
+ | 1997-06-10 18:32:01
+ | 1997-02-10 17:32:01
+ | 1997-02-11 17:32:01
+ | 1997-02-12 17:32:01
+ | 1997-02-13 17:32:01
+ | 1997-02-14 17:32:01
+ | 1997-02-15 17:32:01
+ | 1997-02-16 17:32:01
| 0097-02-16 17:32 BC
| 0097-02-16 17:32:01
| 0597-02-16 17:32:01
| 1697-02-16 17:32:01
| 1797-02-16 17:32:01
| 1897-02-16 17:32:01
- | 1997-02-16 17:32:01-08
+ | 1997-02-16 17:32:01
| 2097-02-16 17:32:01
- | 1996-02-28 17:32:01-08
- | 1996-02-29 17:32:01-08
- | 1996-03-01 17:32:01-08
- | 1996-12-30 17:32:01-08
- | 1996-12-31 17:32:01-08
- | 1997-01-01 17:32:01-08
- | 1997-02-28 17:32:01-08
- | 1997-03-01 17:32:01-08
- | 1997-12-30 17:32:01-08
- | 1997-12-31 17:32:01-08
- | 1999-12-31 17:32:01-08
- | 2000-01-01 17:32:01-08
- | 2000-12-31 17:32:01-08
- | 2001-01-01 17:32:01-08
- | 1957-06-13 00:00:00-07
-(67 rows)
-
-SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
- eight | european_iso
+ | 1996-02-28 17:32:01
+ | 1996-02-29 17:32:01
+ | 1996-03-01 17:32:01
+ | 1996-12-30 17:32:01
+ | 1996-12-31 17:32:01
+ | 1997-01-01 17:32:01
+ | 1997-02-28 17:32:01
+ | 1997-03-01 17:32:01
+ | 1997-12-30 17:32:01
+ | 1997-12-31 17:32:01
+ | 1999-12-31 17:32:01
+ | 2000-01-01 17:32:01
+ | 2000-12-31 17:32:01
+ | 2001-01-01 17:32:01
+ | 1957-06-13 00:00:00
+(65 rows)
+
+SELECT '' AS seven, f1 AS european_iso FROM ABSTIME_TBL;
+ seven | european_iso
-------+------------------------
| 1973-01-14 03:14:21-08
| 1995-05-01 00:30:30-07
- | epoch
- | current
+ | 1969-12-31 16:00:00-08
| infinity
| -infinity
| 1947-05-10 23:59:12-08
| invalid
-(8 rows)
+(7 rows)
SET DateStyle TO 'European,SQL';
SHOW DateStyle;
NOTICE: DateStyle is SQL with European conventions
-SELECT '' AS "67", d1 AS european_sql FROM TIMESTAMP_TBL;
- 67 | european_sql
-----+----------------------------
- | invalid
+SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;
+ 65 | european_sql
+----+------------------------
| -infinity
| infinity
- | epoch
- | 10/02/1997 17:32:01.00 PST
- | invalid
- | invalid
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:02.00 PST
- | 10/02/1997 17:32:01.40 PST
- | 10/02/1997 17:32:01.50 PST
- | 10/02/1997 17:32:01.60 PST
- | 02/01/1997 00:00:00.00 PST
- | 02/01/1997 03:04:05.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/06/1997 17:32:01.00 PDT
- | 15/03/2000 08:14:01.00 PST
- | 15/03/2000 04:14:02.00 PST
- | 15/03/2000 02:14:03.00 PST
- | 15/03/2000 03:14:04.00 PST
- | 15/03/2000 01:14:05.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:00.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 17:32:01.00 PST
- | 10/02/1997 09:32:01.00 PST
- | 10/02/1997 09:32:01.00 PST
- | 10/02/1997 09:32:01.00 PST
- | 10/06/1997 18:32:01.00 PDT
- | 10/02/1997 17:32:01.00 PST
- | 11/02/1997 17:32:01.00 PST
- | 12/02/1997 17:32:01.00 PST
- | 13/02/1997 17:32:01.00 PST
- | 14/02/1997 17:32:01.00 PST
- | 15/02/1997 17:32:01.00 PST
- | 16/02/1997 17:32:01.00 PST
+ | 01/01/1970 00:00:00.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:02.00
+ | 10/02/1997 17:32:01.40
+ | 10/02/1997 17:32:01.50
+ | 10/02/1997 17:32:01.60
+ | 02/01/1997 00:00:00.00
+ | 02/01/1997 03:04:05.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/06/1997 17:32:01.00
+ | 22/09/2001 18:19:20.00
+ | 15/03/2000 08:14:01.00
+ | 15/03/2000 13:14:02.00
+ | 15/03/2000 12:14:03.00
+ | 15/03/2000 03:14:04.00
+ | 15/03/2000 02:14:05.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:00.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 10/06/1997 18:32:01.00
+ | 10/02/1997 17:32:01.00
+ | 11/02/1997 17:32:01.00
+ | 12/02/1997 17:32:01.00
+ | 13/02/1997 17:32:01.00
+ | 14/02/1997 17:32:01.00
+ | 15/02/1997 17:32:01.00
+ | 16/02/1997 17:32:01.00
| 16/02/0097 17:32 BC
| 16/02/0097 17:32:01.00
| 16/02/0597 17:32:01.00
| 16/02/1697 17:32:01.00
| 16/02/1797 17:32:01.00
| 16/02/1897 17:32:01.00
- | 16/02/1997 17:32:01.00 PST
+ | 16/02/1997 17:32:01.00
| 16/02/2097 17:32:01.00
- | 28/02/1996 17:32:01.00 PST
- | 29/02/1996 17:32:01.00 PST
- | 01/03/1996 17:32:01.00 PST
- | 30/12/1996 17:32:01.00 PST
- | 31/12/1996 17:32:01.00 PST
- | 01/01/1997 17:32:01.00 PST
- | 28/02/1997 17:32:01.00 PST
- | 01/03/1997 17:32:01.00 PST
- | 30/12/1997 17:32:01.00 PST
- | 31/12/1997 17:32:01.00 PST
- | 31/12/1999 17:32:01.00 PST
- | 01/01/2000 17:32:01.00 PST
- | 31/12/2000 17:32:01.00 PST
- | 01/01/2001 17:32:01.00 PST
- | 13/06/1957 00:00:00.00 PDT
-(67 rows)
-
-SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
- eight | european_sql
+ | 28/02/1996 17:32:01.00
+ | 29/02/1996 17:32:01.00
+ | 01/03/1996 17:32:01.00
+ | 30/12/1996 17:32:01.00
+ | 31/12/1996 17:32:01.00
+ | 01/01/1997 17:32:01.00
+ | 28/02/1997 17:32:01.00
+ | 01/03/1997 17:32:01.00
+ | 30/12/1997 17:32:01.00
+ | 31/12/1997 17:32:01.00
+ | 31/12/1999 17:32:01.00
+ | 01/01/2000 17:32:01.00
+ | 31/12/2000 17:32:01.00
+ | 01/01/2001 17:32:01.00
+ | 13/06/1957 00:00:00.00
+(65 rows)
+
+SELECT '' AS seven, f1 AS european_sql FROM ABSTIME_TBL;
+ seven | european_sql
-------+----------------------------
| 14/01/1973 03:14:21.00 PST
| 01/05/1995 00:30:30.00 PDT
- | epoch
- | current
+ | 31/12/1969 16:00:00.00 PST
| infinity
| -infinity
| 10/05/1947 23:59:12.00 PST
| invalid
-(8 rows)
+(7 rows)
RESET DateStyle;
prorettype | prorettype
------------+------------
25 | 1043
-(1 row)
+ 1114 | 1184
+(2 rows)
SELECT DISTINCT p1.proargtypes[0], p2.proargtypes[0]
FROM pg_proc AS p1, pg_proc AS p2
proargtypes | proargtypes
-------------+-------------
25 | 1043
+ 1114 | 1184
1560 | 1562
-(2 rows)
+(3 rows)
SELECT DISTINCT p1.proargtypes[1], p2.proargtypes[1]
FROM pg_proc AS p1, pg_proc AS p2
(p1.proargtypes[1] < p2.proargtypes[1]);
proargtypes | proargtypes
-------------+-------------
+ 1114 | 1184
1560 | 1562
-(1 row)
+(2 rows)
SELECT DISTINCT p1.proargtypes[2], p2.proargtypes[2]
FROM pg_proc AS p1, pg_proc AS p2
(p1.proargtypes[2] < p2.proargtypes[2]);
proargtypes | proargtypes
-------------+-------------
-(0 rows)
+ 1114 | 1184
+(1 row)
SELECT DISTINCT p1.proargtypes[3], p2.proargtypes[3]
FROM pg_proc AS p1, pg_proc AS p2
(p1.proargtypes[3] < p2.proargtypes[3]);
proargtypes | proargtypes
-------------+-------------
-(0 rows)
+ 1114 | 1184
+(1 row)
SELECT DISTINCT p1.proargtypes[4], p2.proargtypes[4]
FROM pg_proc AS p1, pg_proc AS p2
oid | aggname | oid | proname
-------+---------+-----+-------------
10021 | max | 768 | int4larger
- 10036 | min | 769 | int4smaller
+ 10037 | min | 769 | int4smaller
(2 rows)
-- Cross-check finalfn (if present) against its entry in pg_proc.
);
UPDATE shoelace_data SET sl_avail = 6 WHERE sl_name = 'sl7';
SELECT * FROM shoelace_log;
- sl_name | sl_avail | log_who | log_when
-------------+----------+----------+----------
- sl7 | 6 | Al Bundy | epoch
+ sl_name | sl_avail | log_who | log_when
+------------+----------+----------+--------------------------
+ sl7 | 6 | Al Bundy | Thu Jan 01 00:00:00 1970
(1 row)
CREATE RULE shoelace_ins AS ON INSERT TO shoelace
(8 rows)
SELECT * FROM shoelace_log ORDER BY sl_name;
- sl_name | sl_avail | log_who | log_when
-------------+----------+----------+----------
- sl3 | 10 | Al Bundy | epoch
- sl6 | 20 | Al Bundy | epoch
- sl7 | 6 | Al Bundy | epoch
- sl8 | 21 | Al Bundy | epoch
+ sl_name | sl_avail | log_who | log_when
+------------+----------+----------+--------------------------
+ sl3 | 10 | Al Bundy | Thu Jan 01 00:00:00 1970
+ sl6 | 20 | Al Bundy | Thu Jan 01 00:00:00 1970
+ sl7 | 6 | Al Bundy | Thu Jan 01 00:00:00 1970
+ sl8 | 21 | Al Bundy | Thu Jan 01 00:00:00 1970
(4 rows)
CREATE VIEW shoelace_obsolete AS
SELECT tablename, rulename, definition FROM pg_rules
ORDER BY tablename, rulename;
- tablename | rulename | definition
----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ tablename | rulename | definition
+---------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
rtest_emp | rtest_emp_del | CREATE RULE rtest_emp_del AS ON DELETE TO rtest_emp DO INSERT INTO rtest_emplog (ename, who, "action", newsal, oldsal) VALUES (old.ename, "current_user"(), 'fired '::bpchar, '$0.00'::money, old.salary);
rtest_emp | rtest_emp_ins | CREATE RULE rtest_emp_ins AS ON INSERT TO rtest_emp DO INSERT INTO rtest_emplog (ename, who, "action", newsal, oldsal) VALUES (new.ename, "current_user"(), 'hired '::bpchar, new.salary, '$0.00'::money);
rtest_emp | rtest_emp_upd | CREATE RULE rtest_emp_upd AS ON UPDATE TO rtest_emp WHERE (new.salary <> old.salary) DO INSERT INTO rtest_emplog (ename, who, "action", newsal, oldsal) VALUES (new.ename, "current_user"(), 'honored '::bpchar, new.salary, old.salary);
shoelace | shoelace_del | CREATE RULE shoelace_del AS ON DELETE TO shoelace DO INSTEAD DELETE FROM shoelace_data WHERE (shoelace_data.sl_name = old.sl_name);
shoelace | shoelace_ins | CREATE RULE shoelace_ins AS ON INSERT TO shoelace DO INSTEAD INSERT INTO shoelace_data (sl_name, sl_avail, sl_color, sl_len, sl_unit) VALUES (new.sl_name, new.sl_avail, new.sl_color, new.sl_len, new.sl_unit);
shoelace | shoelace_upd | CREATE RULE shoelace_upd AS ON UPDATE TO shoelace DO INSTEAD UPDATE shoelace_data SET sl_name = new.sl_name, sl_avail = new.sl_avail, sl_color = new.sl_color, sl_len = new.sl_len, sl_unit = new.sl_unit WHERE (shoelace_data.sl_name = old.sl_name);
- shoelace_data | log_shoelace | CREATE RULE log_shoelace AS ON UPDATE TO shoelace_data WHERE (new.sl_avail <> old.sl_avail) DO INSERT INTO shoelace_log (sl_name, sl_avail, log_who, log_when) VALUES (new.sl_name, new.sl_avail, 'Al Bundy'::name, "timestamp"('epoch'::text));
+ shoelace_data | log_shoelace | CREATE RULE log_shoelace AS ON UPDATE TO shoelace_data WHERE (new.sl_avail <> old.sl_avail) DO INSERT INTO shoelace_log (sl_name, sl_avail, log_who, log_when) VALUES (new.sl_name, new.sl_avail, 'Al Bundy'::name, 'Thu Jan 01 00:00:00 1970'::"timestamp");
shoelace_ok | shoelace_ok_ins | CREATE RULE shoelace_ok_ins AS ON INSERT TO shoelace_ok DO INSTEAD UPDATE shoelace SET sl_avail = (shoelace.sl_avail + new.ok_quant) WHERE (shoelace.sl_name = new.ok_name);
(27 rows)
--
-- TIME
--
-CREATE TABLE TIME_TBL (f1 time, f2 time with time zone);
-INSERT INTO TIME_TBL VALUES ('00:00', '00:00 PDT');
-INSERT INTO TIME_TBL VALUES ('01:00', '01:00 PDT');
-INSERT INTO TIME_TBL VALUES ('02:03', '02:03 PDT');
-INSERT INTO TIME_TBL VALUES ('11:59', '11:59 PDT');
-INSERT INTO TIME_TBL VALUES ('12:00', '12:00 PDT');
-INSERT INTO TIME_TBL VALUES ('12:01', '12:01 PDT');
-INSERT INTO TIME_TBL VALUES ('23:59', '23:59 PDT');
-INSERT INTO TIME_TBL VALUES ('11:59:59.99 PM', '11:59:59.99 PM PDT');
-SELECT f1 AS "Time", f2 AS "Time TZ" FROM TIME_TBL;
- Time | Time TZ
-----------+-------------
- 00:00:00 | 00:00:00-07
- 01:00:00 | 01:00:00-07
- 02:03:00 | 02:03:00-07
- 11:59:00 | 11:59:00-07
- 12:00:00 | 12:00:00-07
- 12:01:00 | 12:01:00-07
- 23:59:00 | 23:59:00-07
- 23:59:59 | 23:59:59-07
+CREATE TABLE TIME_TBL (f1 time);
+INSERT INTO TIME_TBL VALUES ('00:00');
+INSERT INTO TIME_TBL VALUES ('01:00');
+INSERT INTO TIME_TBL VALUES ('02:03');
+INSERT INTO TIME_TBL VALUES ('07:07 PST');
+ERROR: Bad time external representation '07:07 PST'
+INSERT INTO TIME_TBL VALUES ('08:08 EDT');
+ERROR: Bad time external representation '08:08 EDT'
+INSERT INTO TIME_TBL VALUES ('11:59');
+INSERT INTO TIME_TBL VALUES ('12:00');
+INSERT INTO TIME_TBL VALUES ('12:01');
+INSERT INTO TIME_TBL VALUES ('23:59');
+INSERT INTO TIME_TBL VALUES ('11:59:59.99 PM');
+SELECT f1 AS "Time" FROM TIME_TBL;
+ Time
+----------
+ 00:00:00
+ 01:00:00
+ 02:03:00
+ 11:59:00
+ 12:00:00
+ 12:01:00
+ 23:59:00
+ 23:59:59
(8 rows)
SELECT f1 AS "Three" FROM TIME_TBL WHERE f1 < '05:06:07';
SELECT f1 + time '00:01' AS "Illegal" FROM TIME_TBL;
ERROR: Unable to identify an operator '+' for types 'time' and 'time'
You will have to retype this query using an explicit cast
-SELECT f2 + time with time zone '00:01' AS "Illegal" FROM TIME_TBL;
-ERROR: Unable to identify an operator '+' for types 'time with time zone' and 'time with time zone'
- You will have to retype this query using an explicit cast
--
--- DATETIME
+-- TIMESTAMP
--
+-- needed so tests pass even in Australia
+SET australian_timezones = 'off';
+CREATE TABLE TIMESTAMP_TBL ( d1 timestamp without time zone);
-- Shorthand values
-- Not directly usable for regression testing since these are not constants.
-- So, just try to test parser and hope for the best - thomas 97/04/26
--- needed so tests pass
-SET australian_timezones = 'off';
-SELECT (timestamp 'today' = (timestamp 'yesterday' + interval '1 day')) as "True";
- True
-------
- t
-(1 row)
-
-SELECT (timestamp 'today' = (timestamp 'tomorrow' - interval '1 day')) as "True";
- True
-------
- t
-(1 row)
-
-SELECT (timestamp 'tomorrow' = (timestamp 'yesterday' + interval '2 days')) as "True";
- True
-------
- t
-(1 row)
-
-SELECT (timestamp 'current' = 'now') as "True";
- True
-------
- t
-(1 row)
-
-SELECT (timestamp 'now' - 'current') AS "ZeroSecs";
- ZeroSecs
-----------
- @ 0
-(1 row)
-
-SET DateStyle = 'Postgres,NonEuropean';
-SELECT timestamp(date '1994-01-01', time '11:00') AS "Jan_01_1994_11am";
- Jan_01_1994_11am
-------------------------------
- Sat Jan 01 11:00:00 1994 PST
-(1 row)
-
-SELECT timestamp(date '1994-01-01', time '10:00') AS "Jan_01_1994_10am";
- Jan_01_1994_10am
-------------------------------
- Sat Jan 01 10:00:00 1994 PST
-(1 row)
-
-SELECT timestamp(date '1994-01-01', time with time zone '11:00-5') AS "Jan_01_1994_8am";
- Jan_01_1994_8am
-------------------------------
- Sat Jan 01 08:00:00 1994 PST
-(1 row)
-
-CREATE TABLE TIMESTAMP_TBL ( d1 timestamp);
+INSERT INTO TIMESTAMP_TBL VALUES ('now');
INSERT INTO TIMESTAMP_TBL VALUES ('current');
INSERT INTO TIMESTAMP_TBL VALUES ('today');
INSERT INTO TIMESTAMP_TBL VALUES ('yesterday');
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow');
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow EST');
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow zulu');
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today';
- one
------
- 1
-(1 row)
-
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'tomorrow';
- one
------
- 1
-(1 row)
-
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'yesterday';
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'today';
one
-----
1
(1 row)
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today' + interval '1 day';
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'tomorrow';
one
-----
- 1
+ 3
(1 row)
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today' - interval '1 day';
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'yesterday';
one
-----
1
(1 row)
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'now';
- one
------
- 1
+SELECT count(*) AS None FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'now';
+ none
+------
+ 0
(1 row)
DELETE FROM TIMESTAMP_TBL;
-- verify uniform transaction time within transaction block
-INSERT INTO TIMESTAMP_TBL VALUES ('current');
BEGIN;
INSERT INTO TIMESTAMP_TBL VALUES ('now');
-SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp 'now';
+INSERT INTO TIMESTAMP_TBL VALUES ('now');
+SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'now';
two
-----
2
END;
DELETE FROM TIMESTAMP_TBL;
-- Special values
-INSERT INTO TIMESTAMP_TBL VALUES ('invalid');
INSERT INTO TIMESTAMP_TBL VALUES ('-infinity');
INSERT INTO TIMESTAMP_TBL VALUES ('infinity');
INSERT INTO TIMESTAMP_TBL VALUES ('epoch');
+-- Obsolete special values
+INSERT INTO TIMESTAMP_TBL VALUES ('invalid');
+ERROR: Timestamp 'invalid' no longer supported
-- Postgres v6.0 standard output format
INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
INSERT INTO TIMESTAMP_TBL VALUES ('Invalid Abstime');
+ERROR: Bad timestamp external representation 'Invalid Abstime'
INSERT INTO TIMESTAMP_TBL VALUES ('Undefined Abstime');
+ERROR: Bad timestamp external representation 'Undefined Abstime'
-- Variations on Postgres v6.1 standard output format
INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST');
INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST');
INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01 -08:00');
INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 -0800');
INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 17:32:01 -07:00');
+INSERT INTO TIMESTAMP_TBL VALUES ('2001-09-22T18:19:20');
-- POSIX format
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
ERROR: Bad timestamp external representation 'Feb 16 17:32:01 -0097'
INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 5097 BC');
ERROR: Timestamp out of range 'Feb 16 17:32:01 5097 BC'
-SELECT '' AS "66", d1 FROM TIMESTAMP_TBL;
- 66 | d1
-----+---------------------------------
- | invalid
+SELECT '' AS "64", d1 FROM TIMESTAMP_TBL;
+ 64 | d1
+----+-----------------------------
| -infinity
| infinity
- | epoch
- | Mon Feb 10 17:32:01 1997 PST
- | invalid
- | invalid
- | Mon Feb 10 17:32:01.00 1997 PST
- | Mon Feb 10 17:32:02.00 1997 PST
- | Mon Feb 10 17:32:01.40 1997 PST
- | Mon Feb 10 17:32:01.50 1997 PST
- | Mon Feb 10 17:32:01.60 1997 PST
- | Thu Jan 02 00:00:00 1997 PST
- | Thu Jan 02 03:04:05 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Jun 10 17:32:01 1997 PDT
- | Wed Mar 15 08:14:01 2000 PST
- | Wed Mar 15 04:14:02 2000 PST
- | Wed Mar 15 02:14:03 2000 PST
- | Wed Mar 15 03:14:04 2000 PST
- | Wed Mar 15 01:14:05 2000 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:00 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Tue Jun 10 18:32:01 1997 PDT
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Feb 11 17:32:01 1997 PST
- | Wed Feb 12 17:32:01 1997 PST
- | Thu Feb 13 17:32:01 1997 PST
- | Fri Feb 14 17:32:01 1997 PST
- | Sat Feb 15 17:32:01 1997 PST
- | Sun Feb 16 17:32:01 1997 PST
+ | Thu Jan 01 00:00:00 1970
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01.00 1997
+ | Mon Feb 10 17:32:02.00 1997
+ | Mon Feb 10 17:32:01.40 1997
+ | Mon Feb 10 17:32:01.50 1997
+ | Mon Feb 10 17:32:01.60 1997
+ | Thu Jan 02 00:00:00 1997
+ | Thu Jan 02 03:04:05 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 17:32:01 1997
+ | Sat Sep 22 18:19:20 2001
+ | Wed Mar 15 08:14:01 2000
+ | Wed Mar 15 13:14:02 2000
+ | Wed Mar 15 12:14:03 2000
+ | Wed Mar 15 03:14:04 2000
+ | Wed Mar 15 02:14:05 2000
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:00 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 18:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Feb 11 17:32:01 1997
+ | Wed Feb 12 17:32:01 1997
+ | Thu Feb 13 17:32:01 1997
+ | Fri Feb 14 17:32:01 1997
+ | Sat Feb 15 17:32:01 1997
+ | Sun Feb 16 17:32:01 1997
| Tue Feb 16 17:32 0097 BC
| Sat Feb 16 17:32:01 0097
| Thu Feb 16 17:32:01 0597
| Sat Feb 16 17:32:01 1697
| Thu Feb 16 17:32:01 1797
| Tue Feb 16 17:32:01 1897
- | Sun Feb 16 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997
| Sat Feb 16 17:32:01 2097
- | Wed Feb 28 17:32:01 1996 PST
- | Thu Feb 29 17:32:01 1996 PST
- | Fri Mar 01 17:32:01 1996 PST
- | Mon Dec 30 17:32:01 1996 PST
- | Tue Dec 31 17:32:01 1996 PST
- | Wed Jan 01 17:32:01 1997 PST
- | Fri Feb 28 17:32:01 1997 PST
- | Sat Mar 01 17:32:01 1997 PST
- | Tue Dec 30 17:32:01 1997 PST
- | Wed Dec 31 17:32:01 1997 PST
- | Fri Dec 31 17:32:01 1999 PST
- | Sat Jan 01 17:32:01 2000 PST
- | Sun Dec 31 17:32:01 2000 PST
- | Mon Jan 01 17:32:01 2001 PST
-(66 rows)
+ | Wed Feb 28 17:32:01 1996
+ | Thu Feb 29 17:32:01 1996
+ | Fri Mar 01 17:32:01 1996
+ | Mon Dec 30 17:32:01 1996
+ | Tue Dec 31 17:32:01 1996
+ | Wed Jan 01 17:32:01 1997
+ | Fri Feb 28 17:32:01 1997
+ | Sat Mar 01 17:32:01 1997
+ | Tue Dec 30 17:32:01 1997
+ | Wed Dec 31 17:32:01 1997
+ | Fri Dec 31 17:32:01 1999
+ | Sat Jan 01 17:32:01 2000
+ | Sun Dec 31 17:32:01 2000
+ | Mon Jan 01 17:32:01 2001
+(64 rows)
-- Demonstrate functions and operators
-SELECT '' AS "47", d1 FROM TIMESTAMP_TBL
- WHERE d1 > timestamp '1997-01-02' and d1 != timestamp 'current';
- 47 | d1
-----+---------------------------------
- | invalid
+SELECT '' AS "48", d1 FROM TIMESTAMP_TBL
+ WHERE d1 > timestamp without time zone '1997-01-02';
+ 48 | d1
+----+-----------------------------
| infinity
- | Mon Feb 10 17:32:01 1997 PST
- | invalid
- | invalid
- | Mon Feb 10 17:32:01.00 1997 PST
- | Mon Feb 10 17:32:02.00 1997 PST
- | Mon Feb 10 17:32:01.40 1997 PST
- | Mon Feb 10 17:32:01.50 1997 PST
- | Mon Feb 10 17:32:01.60 1997 PST
- | Thu Jan 02 03:04:05 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Jun 10 17:32:01 1997 PDT
- | Wed Mar 15 08:14:01 2000 PST
- | Wed Mar 15 04:14:02 2000 PST
- | Wed Mar 15 02:14:03 2000 PST
- | Wed Mar 15 03:14:04 2000 PST
- | Wed Mar 15 01:14:05 2000 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:00 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Tue Jun 10 18:32:01 1997 PDT
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Feb 11 17:32:01 1997 PST
- | Wed Feb 12 17:32:01 1997 PST
- | Thu Feb 13 17:32:01 1997 PST
- | Fri Feb 14 17:32:01 1997 PST
- | Sat Feb 15 17:32:01 1997 PST
- | Sun Feb 16 17:32:01 1997 PST
- | Sun Feb 16 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01.00 1997
+ | Mon Feb 10 17:32:02.00 1997
+ | Mon Feb 10 17:32:01.40 1997
+ | Mon Feb 10 17:32:01.50 1997
+ | Mon Feb 10 17:32:01.60 1997
+ | Thu Jan 02 03:04:05 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 17:32:01 1997
+ | Sat Sep 22 18:19:20 2001
+ | Wed Mar 15 08:14:01 2000
+ | Wed Mar 15 13:14:02 2000
+ | Wed Mar 15 12:14:03 2000
+ | Wed Mar 15 03:14:04 2000
+ | Wed Mar 15 02:14:05 2000
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:00 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 18:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Feb 11 17:32:01 1997
+ | Wed Feb 12 17:32:01 1997
+ | Thu Feb 13 17:32:01 1997
+ | Fri Feb 14 17:32:01 1997
+ | Sat Feb 15 17:32:01 1997
+ | Sun Feb 16 17:32:01 1997
+ | Sun Feb 16 17:32:01 1997
| Sat Feb 16 17:32:01 2097
- | Fri Feb 28 17:32:01 1997 PST
- | Sat Mar 01 17:32:01 1997 PST
- | Tue Dec 30 17:32:01 1997 PST
- | Wed Dec 31 17:32:01 1997 PST
- | Fri Dec 31 17:32:01 1999 PST
- | Sat Jan 01 17:32:01 2000 PST
- | Sun Dec 31 17:32:01 2000 PST
- | Mon Jan 01 17:32:01 2001 PST
-(50 rows)
+ | Fri Feb 28 17:32:01 1997
+ | Sat Mar 01 17:32:01 1997
+ | Tue Dec 30 17:32:01 1997
+ | Wed Dec 31 17:32:01 1997
+ | Fri Dec 31 17:32:01 1999
+ | Sat Jan 01 17:32:01 2000
+ | Sun Dec 31 17:32:01 2000
+ | Mon Jan 01 17:32:01 2001
+(48 rows)
SELECT '' AS "15", d1 FROM TIMESTAMP_TBL
- WHERE d1 < timestamp '1997-01-02' and d1 != timestamp 'current';
- 15 | d1
-----+------------------------------
+ WHERE d1 < timestamp without time zone '1997-01-02';
+ 15 | d1
+----+--------------------------
| -infinity
- | epoch
+ | Thu Jan 01 00:00:00 1970
| Tue Feb 16 17:32 0097 BC
| Sat Feb 16 17:32:01 0097
| Thu Feb 16 17:32:01 0597
| Sat Feb 16 17:32:01 1697
| Thu Feb 16 17:32:01 1797
| Tue Feb 16 17:32:01 1897
- | Wed Feb 28 17:32:01 1996 PST
- | Thu Feb 29 17:32:01 1996 PST
- | Fri Mar 01 17:32:01 1996 PST
- | Mon Dec 30 17:32:01 1996 PST
- | Tue Dec 31 17:32:01 1996 PST
- | Wed Jan 01 17:32:01 1997 PST
+ | Wed Feb 28 17:32:01 1996
+ | Thu Feb 29 17:32:01 1996
+ | Fri Mar 01 17:32:01 1996
+ | Mon Dec 30 17:32:01 1996
+ | Tue Dec 31 17:32:01 1996
+ | Wed Jan 01 17:32:01 1997
(15 rows)
SELECT '' AS one, d1 FROM TIMESTAMP_TBL
- WHERE d1 = timestamp '1997-01-02' and d1 != timestamp 'current';
- one | d1
------+------------------------------
- | Thu Jan 02 00:00:00 1997 PST
+ WHERE d1 = timestamp without time zone '1997-01-02';
+ one | d1
+-----+--------------------------
+ | Thu Jan 02 00:00:00 1997
(1 row)
-SELECT '' AS "62", d1 FROM TIMESTAMP_TBL
- WHERE d1 != timestamp '1997-01-02' and d1 != timestamp 'current';
- 62 | d1
-----+---------------------------------
- | invalid
+SELECT '' AS "63", d1 FROM TIMESTAMP_TBL
+ WHERE d1 != timestamp without time zone '1997-01-02';
+ 63 | d1
+----+-----------------------------
| -infinity
| infinity
- | epoch
- | Mon Feb 10 17:32:01 1997 PST
- | invalid
- | invalid
- | Mon Feb 10 17:32:01.00 1997 PST
- | Mon Feb 10 17:32:02.00 1997 PST
- | Mon Feb 10 17:32:01.40 1997 PST
- | Mon Feb 10 17:32:01.50 1997 PST
- | Mon Feb 10 17:32:01.60 1997 PST
- | Thu Jan 02 03:04:05 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Jun 10 17:32:01 1997 PDT
- | Wed Mar 15 08:14:01 2000 PST
- | Wed Mar 15 04:14:02 2000 PST
- | Wed Mar 15 02:14:03 2000 PST
- | Wed Mar 15 03:14:04 2000 PST
- | Wed Mar 15 01:14:05 2000 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:00 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Tue Jun 10 18:32:01 1997 PDT
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Feb 11 17:32:01 1997 PST
- | Wed Feb 12 17:32:01 1997 PST
- | Thu Feb 13 17:32:01 1997 PST
- | Fri Feb 14 17:32:01 1997 PST
- | Sat Feb 15 17:32:01 1997 PST
- | Sun Feb 16 17:32:01 1997 PST
+ | Thu Jan 01 00:00:00 1970
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01.00 1997
+ | Mon Feb 10 17:32:02.00 1997
+ | Mon Feb 10 17:32:01.40 1997
+ | Mon Feb 10 17:32:01.50 1997
+ | Mon Feb 10 17:32:01.60 1997
+ | Thu Jan 02 03:04:05 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 17:32:01 1997
+ | Sat Sep 22 18:19:20 2001
+ | Wed Mar 15 08:14:01 2000
+ | Wed Mar 15 13:14:02 2000
+ | Wed Mar 15 12:14:03 2000
+ | Wed Mar 15 03:14:04 2000
+ | Wed Mar 15 02:14:05 2000
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:00 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 18:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Feb 11 17:32:01 1997
+ | Wed Feb 12 17:32:01 1997
+ | Thu Feb 13 17:32:01 1997
+ | Fri Feb 14 17:32:01 1997
+ | Sat Feb 15 17:32:01 1997
+ | Sun Feb 16 17:32:01 1997
| Tue Feb 16 17:32 0097 BC
| Sat Feb 16 17:32:01 0097
| Thu Feb 16 17:32:01 0597
| Sat Feb 16 17:32:01 1697
| Thu Feb 16 17:32:01 1797
| Tue Feb 16 17:32:01 1897
- | Sun Feb 16 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997
| Sat Feb 16 17:32:01 2097
- | Wed Feb 28 17:32:01 1996 PST
- | Thu Feb 29 17:32:01 1996 PST
- | Fri Mar 01 17:32:01 1996 PST
- | Mon Dec 30 17:32:01 1996 PST
- | Tue Dec 31 17:32:01 1996 PST
- | Wed Jan 01 17:32:01 1997 PST
- | Fri Feb 28 17:32:01 1997 PST
- | Sat Mar 01 17:32:01 1997 PST
- | Tue Dec 30 17:32:01 1997 PST
- | Wed Dec 31 17:32:01 1997 PST
- | Fri Dec 31 17:32:01 1999 PST
- | Sat Jan 01 17:32:01 2000 PST
- | Sun Dec 31 17:32:01 2000 PST
- | Mon Jan 01 17:32:01 2001 PST
-(65 rows)
+ | Wed Feb 28 17:32:01 1996
+ | Thu Feb 29 17:32:01 1996
+ | Fri Mar 01 17:32:01 1996
+ | Mon Dec 30 17:32:01 1996
+ | Tue Dec 31 17:32:01 1996
+ | Wed Jan 01 17:32:01 1997
+ | Fri Feb 28 17:32:01 1997
+ | Sat Mar 01 17:32:01 1997
+ | Tue Dec 30 17:32:01 1997
+ | Wed Dec 31 17:32:01 1997
+ | Fri Dec 31 17:32:01 1999
+ | Sat Jan 01 17:32:01 2000
+ | Sun Dec 31 17:32:01 2000
+ | Mon Jan 01 17:32:01 2001
+(63 rows)
SELECT '' AS "16", d1 FROM TIMESTAMP_TBL
- WHERE d1 <= timestamp '1997-01-02' and d1 != timestamp 'current';
- 16 | d1
-----+------------------------------
+ WHERE d1 <= timestamp without time zone '1997-01-02';
+ 16 | d1
+----+--------------------------
| -infinity
- | epoch
- | Thu Jan 02 00:00:00 1997 PST
+ | Thu Jan 01 00:00:00 1970
+ | Thu Jan 02 00:00:00 1997
| Tue Feb 16 17:32 0097 BC
| Sat Feb 16 17:32:01 0097
| Thu Feb 16 17:32:01 0597
| Sat Feb 16 17:32:01 1697
| Thu Feb 16 17:32:01 1797
| Tue Feb 16 17:32:01 1897
- | Wed Feb 28 17:32:01 1996 PST
- | Thu Feb 29 17:32:01 1996 PST
- | Fri Mar 01 17:32:01 1996 PST
- | Mon Dec 30 17:32:01 1996 PST
- | Tue Dec 31 17:32:01 1996 PST
- | Wed Jan 01 17:32:01 1997 PST
+ | Wed Feb 28 17:32:01 1996
+ | Thu Feb 29 17:32:01 1996
+ | Fri Mar 01 17:32:01 1996
+ | Mon Dec 30 17:32:01 1996
+ | Tue Dec 31 17:32:01 1996
+ | Wed Jan 01 17:32:01 1997
(16 rows)
-SELECT '' AS "48", d1 FROM TIMESTAMP_TBL
- WHERE d1 >= timestamp '1997-01-02' and d1 != timestamp 'current';
- 48 | d1
-----+---------------------------------
- | invalid
+SELECT '' AS "49", d1 FROM TIMESTAMP_TBL
+ WHERE d1 >= timestamp without time zone '1997-01-02';
+ 49 | d1
+----+-----------------------------
| infinity
- | Mon Feb 10 17:32:01 1997 PST
- | invalid
- | invalid
- | Mon Feb 10 17:32:01.00 1997 PST
- | Mon Feb 10 17:32:02.00 1997 PST
- | Mon Feb 10 17:32:01.40 1997 PST
- | Mon Feb 10 17:32:01.50 1997 PST
- | Mon Feb 10 17:32:01.60 1997 PST
- | Thu Jan 02 00:00:00 1997 PST
- | Thu Jan 02 03:04:05 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Jun 10 17:32:01 1997 PDT
- | Wed Mar 15 08:14:01 2000 PST
- | Wed Mar 15 04:14:02 2000 PST
- | Wed Mar 15 02:14:03 2000 PST
- | Wed Mar 15 03:14:04 2000 PST
- | Wed Mar 15 01:14:05 2000 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:00 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 17:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Mon Feb 10 09:32:01 1997 PST
- | Tue Jun 10 18:32:01 1997 PDT
- | Mon Feb 10 17:32:01 1997 PST
- | Tue Feb 11 17:32:01 1997 PST
- | Wed Feb 12 17:32:01 1997 PST
- | Thu Feb 13 17:32:01 1997 PST
- | Fri Feb 14 17:32:01 1997 PST
- | Sat Feb 15 17:32:01 1997 PST
- | Sun Feb 16 17:32:01 1997 PST
- | Sun Feb 16 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01.00 1997
+ | Mon Feb 10 17:32:02.00 1997
+ | Mon Feb 10 17:32:01.40 1997
+ | Mon Feb 10 17:32:01.50 1997
+ | Mon Feb 10 17:32:01.60 1997
+ | Thu Jan 02 00:00:00 1997
+ | Thu Jan 02 03:04:05 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 17:32:01 1997
+ | Sat Sep 22 18:19:20 2001
+ | Wed Mar 15 08:14:01 2000
+ | Wed Mar 15 13:14:02 2000
+ | Wed Mar 15 12:14:03 2000
+ | Wed Mar 15 03:14:04 2000
+ | Wed Mar 15 02:14:05 2000
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:00 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Jun 10 18:32:01 1997
+ | Mon Feb 10 17:32:01 1997
+ | Tue Feb 11 17:32:01 1997
+ | Wed Feb 12 17:32:01 1997
+ | Thu Feb 13 17:32:01 1997
+ | Fri Feb 14 17:32:01 1997
+ | Sat Feb 15 17:32:01 1997
+ | Sun Feb 16 17:32:01 1997
+ | Sun Feb 16 17:32:01 1997
| Sat Feb 16 17:32:01 2097
- | Fri Feb 28 17:32:01 1997 PST
- | Sat Mar 01 17:32:01 1997 PST
- | Tue Dec 30 17:32:01 1997 PST
- | Wed Dec 31 17:32:01 1997 PST
- | Fri Dec 31 17:32:01 1999 PST
- | Sat Jan 01 17:32:01 2000 PST
- | Sun Dec 31 17:32:01 2000 PST
- | Mon Jan 01 17:32:01 2001 PST
-(51 rows)
+ | Fri Feb 28 17:32:01 1997
+ | Sat Mar 01 17:32:01 1997
+ | Tue Dec 30 17:32:01 1997
+ | Wed Dec 31 17:32:01 1997
+ | Fri Dec 31 17:32:01 1999
+ | Sat Jan 01 17:32:01 2000
+ | Sun Dec 31 17:32:01 2000
+ | Mon Jan 01 17:32:01 2001
+(49 rows)
-SELECT '' AS "66", d1 + interval '1 year' AS one_year FROM TIMESTAMP_TBL;
- 66 | one_year
-----+---------------------------------
- | invalid
- | -infinity
- | infinity
- | Thu Dec 31 16:00:00 1970 PST
- | Tue Feb 10 17:32:01 1998 PST
- | invalid
- | invalid
- | Tue Feb 10 17:32:01.00 1998 PST
- | Tue Feb 10 17:32:02.00 1998 PST
- | Tue Feb 10 17:32:01.40 1998 PST
- | Tue Feb 10 17:32:01.50 1998 PST
- | Tue Feb 10 17:32:01.60 1998 PST
- | Fri Jan 02 00:00:00 1998 PST
- | Fri Jan 02 03:04:05 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Wed Jun 10 17:32:01 1998 PDT
- | Thu Mar 15 08:14:01 2001 PST
- | Thu Mar 15 04:14:02 2001 PST
- | Thu Mar 15 02:14:03 2001 PST
- | Thu Mar 15 03:14:04 2001 PST
- | Thu Mar 15 01:14:05 2001 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:00 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 17:32:01 1998 PST
- | Tue Feb 10 09:32:01 1998 PST
- | Tue Feb 10 09:32:01 1998 PST
- | Tue Feb 10 09:32:01 1998 PST
- | Wed Jun 10 18:32:01 1998 PDT
- | Tue Feb 10 17:32:01 1998 PST
- | Wed Feb 11 17:32:01 1998 PST
- | Thu Feb 12 17:32:01 1998 PST
- | Fri Feb 13 17:32:01 1998 PST
- | Sat Feb 14 17:32:01 1998 PST
- | Sun Feb 15 17:32:01 1998 PST
- | Mon Feb 16 17:32:01 1998 PST
- | Thu Feb 16 17:32 0096 BC
- | Sun Feb 16 17:32:01 0098
- | Fri Feb 16 17:32:01 0598
- | Wed Feb 16 17:32:01 1098
- | Sun Feb 16 17:32:01 1698
- | Fri Feb 16 17:32:01 1798
- | Wed Feb 16 17:32:01 1898
- | Mon Feb 16 17:32:01 1998 PST
- | Sun Feb 16 17:32:01 2098
- | Fri Feb 28 17:32:01 1997 PST
- | Fri Feb 28 17:32:01 1997 PST
- | Sat Mar 01 17:32:01 1997 PST
- | Tue Dec 30 17:32:01 1997 PST
- | Wed Dec 31 17:32:01 1997 PST
- | Thu Jan 01 17:32:01 1998 PST
- | Sat Feb 28 17:32:01 1998 PST
- | Sun Mar 01 17:32:01 1998 PST
- | Wed Dec 30 17:32:01 1998 PST
- | Thu Dec 31 17:32:01 1998 PST
- | Sun Dec 31 17:32:01 2000 PST
- | Mon Jan 01 17:32:01 2001 PST
- | Mon Dec 31 17:32:01 2001 PST
- | Tue Jan 01 17:32:01 2002 PST
-(66 rows)
-
-SELECT '' AS "66", d1 - interval '1 year' AS one_year FROM TIMESTAMP_TBL;
- 66 | one_year
-----+---------------------------------
- | invalid
- | -infinity
- | infinity
- | Tue Dec 31 16:00:00 1968 PST
- | Sat Feb 10 17:32:01 1996 PST
- | invalid
- | invalid
- | Sat Feb 10 17:32:01.00 1996 PST
- | Sat Feb 10 17:32:02.00 1996 PST
- | Sat Feb 10 17:32:01.40 1996 PST
- | Sat Feb 10 17:32:01.50 1996 PST
- | Sat Feb 10 17:32:01.60 1996 PST
- | Tue Jan 02 00:00:00 1996 PST
- | Tue Jan 02 03:04:05 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Mon Jun 10 17:32:01 1996 PDT
- | Mon Mar 15 08:14:01 1999 PST
- | Mon Mar 15 04:14:02 1999 PST
- | Mon Mar 15 02:14:03 1999 PST
- | Mon Mar 15 03:14:04 1999 PST
- | Mon Mar 15 01:14:05 1999 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:00 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 17:32:01 1996 PST
- | Sat Feb 10 09:32:01 1996 PST
- | Sat Feb 10 09:32:01 1996 PST
- | Sat Feb 10 09:32:01 1996 PST
- | Mon Jun 10 18:32:01 1996 PDT
- | Sat Feb 10 17:32:01 1996 PST
- | Sun Feb 11 17:32:01 1996 PST
- | Mon Feb 12 17:32:01 1996 PST
- | Tue Feb 13 17:32:01 1996 PST
- | Wed Feb 14 17:32:01 1996 PST
- | Thu Feb 15 17:32:01 1996 PST
- | Fri Feb 16 17:32:01 1996 PST
- | Mon Feb 16 17:32 0098 BC
- | Thu Feb 16 17:32:01 0096
- | Tue Feb 16 17:32:01 0596
- | Sun Feb 16 17:32:01 1096
- | Thu Feb 16 17:32:01 1696
- | Tue Feb 16 17:32:01 1796
- | Sun Feb 16 17:32:01 1896
- | Fri Feb 16 17:32:01 1996 PST
- | Thu Feb 16 17:32:01 2096
- | Tue Feb 28 17:32:01 1995 PST
- | Tue Feb 28 17:32:01 1995 PST
- | Wed Mar 01 17:32:01 1995 PST
- | Sat Dec 30 17:32:01 1995 PST
- | Sun Dec 31 17:32:01 1995 PST
- | Mon Jan 01 17:32:01 1996 PST
- | Wed Feb 28 17:32:01 1996 PST
- | Fri Mar 01 17:32:01 1996 PST
- | Mon Dec 30 17:32:01 1996 PST
- | Tue Dec 31 17:32:01 1996 PST
- | Thu Dec 31 17:32:01 1998 PST
- | Fri Jan 01 17:32:01 1999 PST
- | Fri Dec 31 17:32:01 1999 PST
- | Sat Jan 01 17:32:01 2000 PST
-(66 rows)
-
-SELECT '' AS "53", d1 - timestamp '1997-01-02' AS diff
+SELECT '' AS "54", d1 - timestamp without time zone '1997-01-02' AS diff
FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
- 53 | diff
+ 54 | diff
----+----------------------------------------
- | @ 9863 days 8 hours ago
+ | @ 9863 days ago
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1.00 secs
| @ 39 days 17 hours 32 mins 2.00 secs
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
- | @ 159 days 16 hours 32 mins 1 sec
+ | @ 159 days 17 hours 32 mins 1 sec
+ | @ 1724 days 18 hours 19 mins 20 secs
| @ 1168 days 8 hours 14 mins 1 sec
- | @ 1168 days 4 hours 14 mins 2 secs
- | @ 1168 days 2 hours 14 mins 3 secs
+ | @ 1168 days 13 hours 14 mins 2 secs
+ | @ 1168 days 12 hours 14 mins 3 secs
| @ 1168 days 3 hours 14 mins 4 secs
- | @ 1168 days 1 hour 14 mins 5 secs
+ | @ 1168 days 2 hours 14 mins 5 secs
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
- | @ 39 days 9 hours 32 mins 1 sec
- | @ 39 days 9 hours 32 mins 1 sec
- | @ 39 days 9 hours 32 mins 1 sec
- | @ 159 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 159 days 18 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 40 days 17 hours 32 mins 1 sec
| @ 41 days 17 hours 32 mins 1 sec
| @ 1094 days 17 hours 32 mins 1 sec
| @ 1459 days 17 hours 32 mins 1 sec
| @ 1460 days 17 hours 32 mins 1 sec
-(53 rows)
+(54 rows)
-- Test casting within a BETWEEN qualifier
-SELECT '' AS "53", d1 - timestamp '1997-01-02' AS diff
+SELECT '' AS "54", d1 - timestamp without time zone '1997-01-02' AS diff
FROM TIMESTAMP_TBL
- WHERE d1 BETWEEN timestamp '1902-01-01' AND timestamp '2038-01-01';
- 53 | diff
+ WHERE d1 BETWEEN timestamp without time zone '1902-01-01'
+ AND timestamp without time zone '2038-01-01';
+ 54 | diff
----+----------------------------------------
- | @ 9863 days 8 hours ago
+ | @ 9863 days ago
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1.00 secs
| @ 39 days 17 hours 32 mins 2.00 secs
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
- | @ 159 days 16 hours 32 mins 1 sec
+ | @ 159 days 17 hours 32 mins 1 sec
+ | @ 1724 days 18 hours 19 mins 20 secs
| @ 1168 days 8 hours 14 mins 1 sec
- | @ 1168 days 4 hours 14 mins 2 secs
- | @ 1168 days 2 hours 14 mins 3 secs
+ | @ 1168 days 13 hours 14 mins 2 secs
+ | @ 1168 days 12 hours 14 mins 3 secs
| @ 1168 days 3 hours 14 mins 4 secs
- | @ 1168 days 1 hour 14 mins 5 secs
+ | @ 1168 days 2 hours 14 mins 5 secs
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
- | @ 39 days 9 hours 32 mins 1 sec
- | @ 39 days 9 hours 32 mins 1 sec
- | @ 39 days 9 hours 32 mins 1 sec
- | @ 159 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 159 days 18 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 40 days 17 hours 32 mins 1 sec
| @ 41 days 17 hours 32 mins 1 sec
| @ 1094 days 17 hours 32 mins 1 sec
| @ 1459 days 17 hours 32 mins 1 sec
| @ 1460 days 17 hours 32 mins 1 sec
-(53 rows)
+(54 rows)
-SELECT '' AS "53", date_part( 'year', d1) AS year, date_part( 'month', d1) AS month,
+SELECT '' AS "54", 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 TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
- 53 | year | month | day | hour | minute | second
+ 54 | year | month | day | hour | minute | second
----+------+-------+-----+------+--------+----------
| 1969 | 12 | 31 | 16 | 0 | 0
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1.000001
- | 1997 | 2 | 10 | 17 | 32 | 1.999999
- | 1997 | 2 | 10 | 17 | 32 | 1.4
- | 1997 | 2 | 10 | 17 | 32 | 1.5
- | 1997 | 2 | 10 | 17 | 32 | 1.6
- | 1997 | 1 | 2 | 0 | 0 | 0
- | 1997 | 1 | 2 | 3 | 4 | 5
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 6 | 10 | 17 | 32 | 1
- | 2000 | 3 | 15 | 8 | 14 | 1
- | 2000 | 3 | 15 | 4 | 14 | 2
- | 2000 | 3 | 15 | 2 | 14 | 3
- | 2000 | 3 | 15 | 3 | 14 | 4
- | 2000 | 3 | 15 | 1 | 14 | 5
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 0
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1.000001
+ | 1997 | 2 | 10 | 9 | 32 | 1.999999
+ | 1997 | 2 | 10 | 9 | 32 | 1.4
+ | 1997 | 2 | 10 | 9 | 32 | 1.5
+ | 1997 | 2 | 10 | 9 | 32 | 1.6
+ | 1997 | 1 | 1 | 16 | 0 | 0
+ | 1997 | 1 | 1 | 19 | 4 | 5
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 6 | 10 | 10 | 32 | 1
+ | 2001 | 9 | 22 | 11 | 19 | 20
+ | 2000 | 3 | 15 | 0 | 14 | 1
+ | 2000 | 3 | 15 | 5 | 14 | 2
+ | 2000 | 3 | 15 | 4 | 14 | 3
+ | 2000 | 3 | 14 | 19 | 14 | 4
+ | 2000 | 3 | 14 | 18 | 14 | 5
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 0
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
| 1997 | 2 | 10 | 9 | 32 | 1
| 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 6 | 10 | 11 | 32 | 1
| 1997 | 2 | 10 | 9 | 32 | 1
- | 1997 | 6 | 10 | 18 | 32 | 1
- | 1997 | 2 | 10 | 17 | 32 | 1
- | 1997 | 2 | 11 | 17 | 32 | 1
- | 1997 | 2 | 12 | 17 | 32 | 1
- | 1997 | 2 | 13 | 17 | 32 | 1
- | 1997 | 2 | 14 | 17 | 32 | 1
- | 1997 | 2 | 15 | 17 | 32 | 1
- | 1997 | 2 | 16 | 17 | 32 | 1
- | 1997 | 2 | 16 | 17 | 32 | 1
- | 1996 | 2 | 28 | 17 | 32 | 1
- | 1996 | 2 | 29 | 17 | 32 | 1
- | 1996 | 3 | 1 | 17 | 32 | 1
- | 1996 | 12 | 30 | 17 | 32 | 1
- | 1996 | 12 | 31 | 17 | 32 | 1
- | 1997 | 1 | 1 | 17 | 32 | 1
- | 1997 | 2 | 28 | 17 | 32 | 1
- | 1997 | 3 | 1 | 17 | 32 | 1
- | 1997 | 12 | 30 | 17 | 32 | 1
- | 1997 | 12 | 31 | 17 | 32 | 1
- | 1999 | 12 | 31 | 17 | 32 | 1
- | 2000 | 1 | 1 | 17 | 32 | 1
- | 2000 | 12 | 31 | 17 | 32 | 1
- | 2001 | 1 | 1 | 17 | 32 | 1
-(53 rows)
+ | 1997 | 2 | 11 | 9 | 32 | 1
+ | 1997 | 2 | 12 | 9 | 32 | 1
+ | 1997 | 2 | 13 | 9 | 32 | 1
+ | 1997 | 2 | 14 | 9 | 32 | 1
+ | 1997 | 2 | 15 | 9 | 32 | 1
+ | 1997 | 2 | 16 | 9 | 32 | 1
+ | 1997 | 2 | 16 | 9 | 32 | 1
+ | 1996 | 2 | 28 | 9 | 32 | 1
+ | 1996 | 2 | 29 | 9 | 32 | 1
+ | 1996 | 3 | 1 | 9 | 32 | 1
+ | 1996 | 12 | 30 | 9 | 32 | 1
+ | 1996 | 12 | 31 | 9 | 32 | 1
+ | 1997 | 1 | 1 | 9 | 32 | 1
+ | 1997 | 2 | 28 | 9 | 32 | 1
+ | 1997 | 3 | 1 | 9 | 32 | 1
+ | 1997 | 12 | 30 | 9 | 32 | 1
+ | 1997 | 12 | 31 | 9 | 32 | 1
+ | 1999 | 12 | 31 | 9 | 32 | 1
+ | 2000 | 1 | 1 | 9 | 32 | 1
+ | 2000 | 12 | 31 | 9 | 32 | 1
+ | 2001 | 1 | 1 | 9 | 32 | 1
+(54 rows)
-SELECT '' AS "53", date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
+SELECT '' AS "54", date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
date_part( 'usec', d1) AS usec
FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
- 53 | quarter | msec | usec
+ 54 | quarter | msec | usec
----+---------+----------------------+-------------------
| 4 | 0 | 0
| 1 | 0 | 0
| 1 | 0 | 0
| 1 | 0 | 0
| 2 | 0 | 0
+ | 3 | 0 | 0
| 1 | 0 | 0
| 1 | 0 | 0
| 1 | 0 | 0
| 1 | 0 | 0
| 4 | 0 | 0
| 1 | 0 | 0
-(53 rows)
+(54 rows)
-- TO_CHAR()
---
SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
FROM TIMESTAMP_TBL;
to_char_1 | to_char
-----------+------------------------------------------------------------------------------------------
|
|
- |
| THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan
| MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
- |
- |
| MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
| MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
| MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
| MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
| MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
| TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun
+ | SATURDAY Saturday saturday SAT Sat sat SEPTEMBER September september IX SEP Sep sep
| WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
| WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
| WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
| SATURDAY Saturday saturday SAT Sat sat JANUARY January january I JAN Jan jan
| SUNDAY Sunday sunday SUN Sun sun DECEMBER December december XII DEC Dec dec
| MONDAY Monday monday MON Mon mon JANUARY January january I JAN Jan jan
-(66 rows)
+(64 rows)
-
SELECT '' AS to_char_2, to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM')
- FROM TIMESTAMP_TBL;
+ FROM TIMESTAMP_TBL;
to_char_2 | to_char
-----------+--------------------------------------------------------------
|
|
- |
| THURSDAY Thursday thursday JANUARY January january I
| MONDAY Monday monday FEBRUARY February february II
- |
- |
| MONDAY Monday monday FEBRUARY February february II
| MONDAY Monday monday FEBRUARY February february II
| MONDAY Monday monday FEBRUARY February february II
| MONDAY Monday monday FEBRUARY February february II
| MONDAY Monday monday FEBRUARY February february II
| TUESDAY Tuesday tuesday JUNE June june VI
+ | SATURDAY Saturday saturday SEPTEMBER September september IX
| WEDNESDAY Wednesday wednesday MARCH March march III
| WEDNESDAY Wednesday wednesday MARCH March march III
| WEDNESDAY Wednesday wednesday MARCH March march III
| SATURDAY Saturday saturday JANUARY January january I
| SUNDAY Sunday sunday DECEMBER December december XII
| MONDAY Monday monday JANUARY January january I
-(66 rows)
+(64 rows)
SELECT '' AS to_char_3, to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J')
FROM TIMESTAMP_TBL;
-----------+-------------------------------------------------
|
|
- |
| 1,970 1970 970 70 0 20 1 01 01 001 01 5 2440588
| 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
- |
- |
| 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
| 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
| 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
| 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
| 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
| 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610
+ | 2,001 2001 001 01 1 21 3 09 38 265 22 7 2452175
| 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
| 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
| 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
| 2,000 2000 000 00 0 21 1 01 01 001 01 7 2451545
| 2,000 2000 000 00 0 21 4 12 53 366 31 1 2451910
| 2,001 2001 001 01 1 21 1 01 01 001 01 2 2451911
-(66 rows)
+(64 rows)
-
SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
- FROM TIMESTAMP_TBL;
+ FROM TIMESTAMP_TBL;
to_char_4 | to_char
-----------+-------------------------------------------------
|
|
- |
| 1,970 1970 970 70 0 20 1 1 1 1 1 5 2440588
| 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
- |
- |
| 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
| 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
| 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
| 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
| 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
| 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610
+ | 2,001 2001 001 01 1 21 3 9 38 265 22 7 2452175
| 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
| 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
| 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
| 2,000 2000 000 00 0 21 1 1 1 1 1 7 2451545
| 2,000 2000 000 00 0 21 4 12 53 366 31 1 2451910
| 2,001 2001 001 01 1 21 1 1 1 1 1 2 2451911
-(66 rows)
+(64 rows)
-
SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
FROM TIMESTAMP_TBL;
to_char_5 | to_char
-----------+----------------------
|
|
- |
| 12 12 00 00 00 0
| 05 05 17 32 01 63121
- |
- |
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
+ | 06 06 18 19 20 65960
| 08 08 08 14 01 29641
- | 04 04 04 14 02 15242
- | 02 02 02 14 03 8043
+ | 01 01 13 14 02 47642
+ | 12 12 12 14 03 44043
| 03 03 03 14 04 11644
- | 01 01 01 14 05 4445
+ | 02 02 02 14 05 8045
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 00 63120
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
- | 09 09 09 32 01 34321
- | 09 09 09 32 01 34321
- | 09 09 09 32 01 34321
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
| 06 06 18 32 01 66721
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
-(66 rows)
+(64 rows)
-SELECT '' AS to_char_6, to_char(d1, '"HH:MI:SS is" HH:MI:SS "\\"text bettween quote marks\\""')
- FROM TIMESTAMP_TBL;
- to_char_6 | to_char
------------+--------------------------------------------------
- |
- |
- |
- | HH:MI:SS is 12:00:00 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
+SELECT '' AS to_char_6, to_char(d1, '"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
+ FROM TIMESTAMP_TBL;
+ to_char_6 | to_char
+-----------+-------------------------------------------------
|
|
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 12:00:00 "text bettween quote marks"
- | HH:MI:SS is 03:04:05 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 08:14:01 "text bettween quote marks"
- | HH:MI:SS is 04:14:02 "text bettween quote marks"
- | HH:MI:SS is 02:14:03 "text bettween quote marks"
- | HH:MI:SS is 03:14:04 "text bettween quote marks"
- | HH:MI:SS is 01:14:05 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:00 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 09:32:01 "text bettween quote marks"
- | HH:MI:SS is 09:32:01 "text bettween quote marks"
- | HH:MI:SS is 09:32:01 "text bettween quote marks"
- | HH:MI:SS is 06:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
- | HH:MI:SS is 05:32:01 "text bettween quote marks"
-(66 rows)
+ | HH:MI:SS is 12:00:00 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 12:00:00 "text between quote marks"
+ | HH:MI:SS is 03:04:05 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 06:19:20 "text between quote marks"
+ | HH:MI:SS is 08:14:01 "text between quote marks"
+ | HH:MI:SS is 01:14:02 "text between quote marks"
+ | HH:MI:SS is 12:14:03 "text between quote marks"
+ | HH:MI:SS is 03:14:04 "text between quote marks"
+ | HH:MI:SS is 02:14:05 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:00 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 06:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+(64 rows)
-
SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
- FROM TIMESTAMP_TBL;
+ FROM TIMESTAMP_TBL;
to_char_7 | to_char
-----------+------------------------
|
|
- |
| 00--text--00--text--00
| 17--text--32--text--01
- |
- |
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
+ | 18--text--19--text--20
| 08--text--14--text--01
- | 04--text--14--text--02
- | 02--text--14--text--03
+ | 13--text--14--text--02
+ | 12--text--14--text--03
| 03--text--14--text--04
- | 01--text--14--text--05
+ | 02--text--14--text--05
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--00
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
- | 09--text--32--text--01
- | 09--text--32--text--01
- | 09--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
| 18--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
-(66 rows)
+(64 rows)
SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
FROM TIMESTAMP_TBL;
-----------+-------------------------
|
|
- |
| 1970TH 1970th 2440588th
| 1997TH 1997th 2450490th
- |
- |
| 1997TH 1997th 2450490th
| 1997TH 1997th 2450490th
| 1997TH 1997th 2450490th
| 1997TH 1997th 2450490th
| 1997TH 1997th 2450490th
| 1997TH 1997th 2450610th
+ | 2001ST 2001st 2452175th
| 2000TH 2000th 2451619th
| 2000TH 2000th 2451619th
| 2000TH 2000th 2451619th
| 2000TH 2000th 2451545th
| 2000TH 2000th 2451910th
| 2001ST 2001st 2451911th
-(66 rows)
+(64 rows)
SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm')
-----------+---------------------------------------------------------------------
|
|
- |
| 1970 A.D. 1970 a.d. 1970 ad 12:00:00 A.M. 12:00:00 a.m. 12:00:00 am
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
- |
- |
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 2001 A.D. 2001 a.d. 2001 ad 06:19:20 P.M. 06:19:20 p.m. 06:19:20 pm
| 2000 A.D. 2000 a.d. 2000 ad 08:14:01 A.M. 08:14:01 a.m. 08:14:01 am
- | 2000 A.D. 2000 a.d. 2000 ad 04:14:02 A.M. 04:14:02 a.m. 04:14:02 am
- | 2000 A.D. 2000 a.d. 2000 ad 02:14:03 A.M. 02:14:03 a.m. 02:14:03 am
+ | 2000 A.D. 2000 a.d. 2000 ad 01:14:02 P.M. 01:14:02 p.m. 01:14:02 pm
+ | 2000 A.D. 2000 a.d. 2000 ad 12:14:03 P.M. 12:14:03 p.m. 12:14:03 pm
| 2000 A.D. 2000 a.d. 2000 ad 03:14:04 A.M. 03:14:04 a.m. 03:14:04 am
- | 2000 A.D. 2000 a.d. 2000 ad 01:14:05 A.M. 01:14:05 a.m. 01:14:05 am
+ | 2000 A.D. 2000 a.d. 2000 ad 02:14:05 A.M. 02:14:05 a.m. 02:14:05 am
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:00 P.M. 05:32:00 p.m. 05:32:00 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
- | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
- | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
- | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 06:32:01 P.M. 06:32:01 p.m. 06:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 2001 A.D. 2001 a.d. 2001 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
-(66 rows)
+(64 rows)
-- TO_TIMESTAMP()
---
SELECT '' AS to_timestamp_1, to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
to_timestamp_1 | to_timestamp
----------------+--------------------------
| Sat Feb 16 08:14:30 0097
(1 row)
-
SELECT '' AS to_timestamp_2, to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
to_timestamp_2 | to_timestamp
----------------+--------------------------
(1 row)
SELECT '' AS to_timestamp_4, to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
- '"My birthday-> Year" YYYY, "Month:" FMMonth, "Day:" DD');
+ '"My birthday-> Year" YYYY, "Month:" FMMonth, "Day:" DD');
to_timestamp_4 | to_timestamp
----------------+------------------------------
| Sun May 16 00:00:00 1976 PDT
| Sat Aug 21 00:00:00 1582
(1 row)
-SELECT '' AS to_timestamp_6, to_timestamp('15 "text bettween quote marks" 98 54 45',
- 'HH "\\text bettween quote marks\\"" YY MI SS');
+SELECT '' AS to_timestamp_6, to_timestamp('15 "text between quote marks" 98 54 45',
+ 'HH "\\text between quote marks\\"" YY MI SS');
to_timestamp_6 | to_timestamp
----------------+------------------------------
| Thu Jan 01 15:54:45 1998 PST
--- /dev/null
+--
+-- TIMESTAMPTZ
+--
+-- needed so tests pass even in Australia
+SET australian_timezones = 'off';
+CREATE TABLE TIMESTAMPTZ_TBL ( d1 timestamp with time zone);
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('today');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('yesterday');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow EST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow zulu');
+SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'today';
+ one
+-----
+ 1
+(1 row)
+
+SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'tomorrow';
+ one
+-----
+ 1
+(1 row)
+
+SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'yesterday';
+ one
+-----
+ 1
+(1 row)
+
+SELECT count(*) AS None FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'now';
+ none
+------
+ 0
+(1 row)
+
+DELETE FROM TIMESTAMPTZ_TBL;
+-- verify uniform transaction time within transaction block
+BEGIN;
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
+SELECT count(*) AS two FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'now';
+ two
+-----
+ 2
+(1 row)
+
+END;
+DELETE FROM TIMESTAMPTZ_TBL;
+-- Special values
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('-infinity');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('infinity');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch');
+-- Obsolete special values
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid');
+ERROR: Timestamp with time zone 'invalid' no longer supported
+-- Postgres v6.0 standard output format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Invalid Abstime');
+ERROR: Bad timestamp external representation 'Invalid Abstime'
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Undefined Abstime');
+ERROR: Bad timestamp external representation 'Undefined Abstime'
+-- Variations on Postgres v6.1 standard output format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.5 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.6 1997 PST');
+-- ISO 8601 format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02 03:04:05');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-08');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 -08:00');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20');
+-- POSIX format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT -2');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 EST+3');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 EST +2:00');
+-- Variations for acceptable input formats
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 5:32PM 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997/02/10 17:32:01-0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb-10-1997 17:32:01 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('02-10-1997 17:32:01 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('97FEB10 5:32:01PM UTC');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('97/02/10 17:32:01 UTC');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('97.041 17:32:01 UTC');
+-- Check date conversion and date arithmetic
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 18:32:01 PDT');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 11 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 12 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 13 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 14 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 15 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097 BC');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0597');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1097');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1697');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1797');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1897');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 2097');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
+ERROR: Bad timestamp external representation 'Feb 29 17:32:01 1997'
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1999');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2000');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 2000');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2001');
+-- Currently unsupported syntax and ranges
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097');
+ERROR: Bad timestamp external representation 'Feb 16 17:32:01 -0097'
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC');
+ERROR: Timestamp out of range 'Feb 16 17:32:01 5097 BC'
+SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL;
+ 64 | d1
+----+---------------------------------
+ | -infinity
+ | infinity
+ | Wed Dec 31 16:00:00 1969 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01.00 1997 PST
+ | Mon Feb 10 17:32:02.00 1997 PST
+ | Mon Feb 10 17:32:01.40 1997 PST
+ | Mon Feb 10 17:32:01.50 1997 PST
+ | Mon Feb 10 17:32:01.60 1997 PST
+ | Thu Jan 02 00:00:00 1997 PST
+ | Thu Jan 02 03:04:05 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Jun 10 17:32:01 1997 PDT
+ | Sat Sep 22 11:19:20 2001 PDT
+ | Wed Mar 15 08:14:01 2000 PST
+ | Wed Mar 15 04:14:02 2000 PST
+ | Wed Mar 15 02:14:03 2000 PST
+ | Wed Mar 15 03:14:04 2000 PST
+ | Wed Mar 15 01:14:05 2000 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:00 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Tue Jun 10 18:32:01 1997 PDT
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Feb 11 17:32:01 1997 PST
+ | Wed Feb 12 17:32:01 1997 PST
+ | Thu Feb 13 17:32:01 1997 PST
+ | Fri Feb 14 17:32:01 1997 PST
+ | Sat Feb 15 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997 PST
+ | Tue Feb 16 17:32 0097 BC
+ | Sat Feb 16 17:32:01 0097
+ | Thu Feb 16 17:32:01 0597
+ | Tue Feb 16 17:32:01 1097
+ | Sat Feb 16 17:32:01 1697
+ | Thu Feb 16 17:32:01 1797
+ | Tue Feb 16 17:32:01 1897
+ | Sun Feb 16 17:32:01 1997 PST
+ | Sat Feb 16 17:32:01 2097
+ | Wed Feb 28 17:32:01 1996 PST
+ | Thu Feb 29 17:32:01 1996 PST
+ | Fri Mar 01 17:32:01 1996 PST
+ | Mon Dec 30 17:32:01 1996 PST
+ | Tue Dec 31 17:32:01 1996 PST
+ | Wed Jan 01 17:32:01 1997 PST
+ | Fri Feb 28 17:32:01 1997 PST
+ | Sat Mar 01 17:32:01 1997 PST
+ | Tue Dec 30 17:32:01 1997 PST
+ | Wed Dec 31 17:32:01 1997 PST
+ | Fri Dec 31 17:32:01 1999 PST
+ | Sat Jan 01 17:32:01 2000 PST
+ | Sun Dec 31 17:32:01 2000 PST
+ | Mon Jan 01 17:32:01 2001 PST
+(64 rows)
+
+-- Demonstrate functions and operators
+SELECT '' AS "48", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 > timestamp with time zone '1997-01-02';
+ 48 | d1
+----+---------------------------------
+ | infinity
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01.00 1997 PST
+ | Mon Feb 10 17:32:02.00 1997 PST
+ | Mon Feb 10 17:32:01.40 1997 PST
+ | Mon Feb 10 17:32:01.50 1997 PST
+ | Mon Feb 10 17:32:01.60 1997 PST
+ | Thu Jan 02 03:04:05 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Jun 10 17:32:01 1997 PDT
+ | Sat Sep 22 11:19:20 2001 PDT
+ | Wed Mar 15 08:14:01 2000 PST
+ | Wed Mar 15 04:14:02 2000 PST
+ | Wed Mar 15 02:14:03 2000 PST
+ | Wed Mar 15 03:14:04 2000 PST
+ | Wed Mar 15 01:14:05 2000 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:00 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Tue Jun 10 18:32:01 1997 PDT
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Feb 11 17:32:01 1997 PST
+ | Wed Feb 12 17:32:01 1997 PST
+ | Thu Feb 13 17:32:01 1997 PST
+ | Fri Feb 14 17:32:01 1997 PST
+ | Sat Feb 15 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997 PST
+ | Sat Feb 16 17:32:01 2097
+ | Fri Feb 28 17:32:01 1997 PST
+ | Sat Mar 01 17:32:01 1997 PST
+ | Tue Dec 30 17:32:01 1997 PST
+ | Wed Dec 31 17:32:01 1997 PST
+ | Fri Dec 31 17:32:01 1999 PST
+ | Sat Jan 01 17:32:01 2000 PST
+ | Sun Dec 31 17:32:01 2000 PST
+ | Mon Jan 01 17:32:01 2001 PST
+(48 rows)
+
+SELECT '' AS "15", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 < timestamp with time zone '1997-01-02';
+ 15 | d1
+----+------------------------------
+ | -infinity
+ | Wed Dec 31 16:00:00 1969 PST
+ | Tue Feb 16 17:32 0097 BC
+ | Sat Feb 16 17:32:01 0097
+ | Thu Feb 16 17:32:01 0597
+ | Tue Feb 16 17:32:01 1097
+ | Sat Feb 16 17:32:01 1697
+ | Thu Feb 16 17:32:01 1797
+ | Tue Feb 16 17:32:01 1897
+ | Wed Feb 28 17:32:01 1996 PST
+ | Thu Feb 29 17:32:01 1996 PST
+ | Fri Mar 01 17:32:01 1996 PST
+ | Mon Dec 30 17:32:01 1996 PST
+ | Tue Dec 31 17:32:01 1996 PST
+ | Wed Jan 01 17:32:01 1997 PST
+(15 rows)
+
+SELECT '' AS one, d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 = timestamp with time zone '1997-01-02';
+ one | d1
+-----+------------------------------
+ | Thu Jan 02 00:00:00 1997 PST
+(1 row)
+
+SELECT '' AS "63", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 != timestamp with time zone '1997-01-02';
+ 63 | d1
+----+---------------------------------
+ | -infinity
+ | infinity
+ | Wed Dec 31 16:00:00 1969 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01.00 1997 PST
+ | Mon Feb 10 17:32:02.00 1997 PST
+ | Mon Feb 10 17:32:01.40 1997 PST
+ | Mon Feb 10 17:32:01.50 1997 PST
+ | Mon Feb 10 17:32:01.60 1997 PST
+ | Thu Jan 02 03:04:05 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Jun 10 17:32:01 1997 PDT
+ | Sat Sep 22 11:19:20 2001 PDT
+ | Wed Mar 15 08:14:01 2000 PST
+ | Wed Mar 15 04:14:02 2000 PST
+ | Wed Mar 15 02:14:03 2000 PST
+ | Wed Mar 15 03:14:04 2000 PST
+ | Wed Mar 15 01:14:05 2000 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:00 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Tue Jun 10 18:32:01 1997 PDT
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Feb 11 17:32:01 1997 PST
+ | Wed Feb 12 17:32:01 1997 PST
+ | Thu Feb 13 17:32:01 1997 PST
+ | Fri Feb 14 17:32:01 1997 PST
+ | Sat Feb 15 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997 PST
+ | Tue Feb 16 17:32 0097 BC
+ | Sat Feb 16 17:32:01 0097
+ | Thu Feb 16 17:32:01 0597
+ | Tue Feb 16 17:32:01 1097
+ | Sat Feb 16 17:32:01 1697
+ | Thu Feb 16 17:32:01 1797
+ | Tue Feb 16 17:32:01 1897
+ | Sun Feb 16 17:32:01 1997 PST
+ | Sat Feb 16 17:32:01 2097
+ | Wed Feb 28 17:32:01 1996 PST
+ | Thu Feb 29 17:32:01 1996 PST
+ | Fri Mar 01 17:32:01 1996 PST
+ | Mon Dec 30 17:32:01 1996 PST
+ | Tue Dec 31 17:32:01 1996 PST
+ | Wed Jan 01 17:32:01 1997 PST
+ | Fri Feb 28 17:32:01 1997 PST
+ | Sat Mar 01 17:32:01 1997 PST
+ | Tue Dec 30 17:32:01 1997 PST
+ | Wed Dec 31 17:32:01 1997 PST
+ | Fri Dec 31 17:32:01 1999 PST
+ | Sat Jan 01 17:32:01 2000 PST
+ | Sun Dec 31 17:32:01 2000 PST
+ | Mon Jan 01 17:32:01 2001 PST
+(63 rows)
+
+SELECT '' AS "16", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 <= timestamp with time zone '1997-01-02';
+ 16 | d1
+----+------------------------------
+ | -infinity
+ | Wed Dec 31 16:00:00 1969 PST
+ | Thu Jan 02 00:00:00 1997 PST
+ | Tue Feb 16 17:32 0097 BC
+ | Sat Feb 16 17:32:01 0097
+ | Thu Feb 16 17:32:01 0597
+ | Tue Feb 16 17:32:01 1097
+ | Sat Feb 16 17:32:01 1697
+ | Thu Feb 16 17:32:01 1797
+ | Tue Feb 16 17:32:01 1897
+ | Wed Feb 28 17:32:01 1996 PST
+ | Thu Feb 29 17:32:01 1996 PST
+ | Fri Mar 01 17:32:01 1996 PST
+ | Mon Dec 30 17:32:01 1996 PST
+ | Tue Dec 31 17:32:01 1996 PST
+ | Wed Jan 01 17:32:01 1997 PST
+(16 rows)
+
+SELECT '' AS "49", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 >= timestamp with time zone '1997-01-02';
+ 49 | d1
+----+---------------------------------
+ | infinity
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01.00 1997 PST
+ | Mon Feb 10 17:32:02.00 1997 PST
+ | Mon Feb 10 17:32:01.40 1997 PST
+ | Mon Feb 10 17:32:01.50 1997 PST
+ | Mon Feb 10 17:32:01.60 1997 PST
+ | Thu Jan 02 00:00:00 1997 PST
+ | Thu Jan 02 03:04:05 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Jun 10 17:32:01 1997 PDT
+ | Sat Sep 22 11:19:20 2001 PDT
+ | Wed Mar 15 08:14:01 2000 PST
+ | Wed Mar 15 04:14:02 2000 PST
+ | Wed Mar 15 02:14:03 2000 PST
+ | Wed Mar 15 03:14:04 2000 PST
+ | Wed Mar 15 01:14:05 2000 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:00 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 17:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Mon Feb 10 09:32:01 1997 PST
+ | Tue Jun 10 18:32:01 1997 PDT
+ | Mon Feb 10 17:32:01 1997 PST
+ | Tue Feb 11 17:32:01 1997 PST
+ | Wed Feb 12 17:32:01 1997 PST
+ | Thu Feb 13 17:32:01 1997 PST
+ | Fri Feb 14 17:32:01 1997 PST
+ | Sat Feb 15 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997 PST
+ | Sun Feb 16 17:32:01 1997 PST
+ | Sat Feb 16 17:32:01 2097
+ | Fri Feb 28 17:32:01 1997 PST
+ | Sat Mar 01 17:32:01 1997 PST
+ | Tue Dec 30 17:32:01 1997 PST
+ | Wed Dec 31 17:32:01 1997 PST
+ | Fri Dec 31 17:32:01 1999 PST
+ | Sat Jan 01 17:32:01 2000 PST
+ | Sun Dec 31 17:32:01 2000 PST
+ | Mon Jan 01 17:32:01 2001 PST
+(49 rows)
+
+SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
+ FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+ 54 | diff
+----+----------------------------------------
+ | @ 9863 days 8 hours ago
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1.00 secs
+ | @ 39 days 17 hours 32 mins 2.00 secs
+ | @ 39 days 17 hours 32 mins 1.40 secs
+ | @ 39 days 17 hours 32 mins 1.50 secs
+ | @ 39 days 17 hours 32 mins 1.60 secs
+ | @ 0
+ | @ 3 hours 4 mins 5 secs
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 159 days 16 hours 32 mins 1 sec
+ | @ 1724 days 10 hours 19 mins 20 secs
+ | @ 1168 days 8 hours 14 mins 1 sec
+ | @ 1168 days 4 hours 14 mins 2 secs
+ | @ 1168 days 2 hours 14 mins 3 secs
+ | @ 1168 days 3 hours 14 mins 4 secs
+ | @ 1168 days 1 hour 14 mins 5 secs
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 9 hours 32 mins 1 sec
+ | @ 39 days 9 hours 32 mins 1 sec
+ | @ 39 days 9 hours 32 mins 1 sec
+ | @ 159 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 40 days 17 hours 32 mins 1 sec
+ | @ 41 days 17 hours 32 mins 1 sec
+ | @ 42 days 17 hours 32 mins 1 sec
+ | @ 43 days 17 hours 32 mins 1 sec
+ | @ 44 days 17 hours 32 mins 1 sec
+ | @ 45 days 17 hours 32 mins 1 sec
+ | @ 45 days 17 hours 32 mins 1 sec
+ | @ 308 days 6 hours 27 mins 59 secs ago
+ | @ 307 days 6 hours 27 mins 59 secs ago
+ | @ 306 days 6 hours 27 mins 59 secs ago
+ | @ 2 days 6 hours 27 mins 59 secs ago
+ | @ 1 day 6 hours 27 mins 59 secs ago
+ | @ 6 hours 27 mins 59 secs ago
+ | @ 57 days 17 hours 32 mins 1 sec
+ | @ 58 days 17 hours 32 mins 1 sec
+ | @ 362 days 17 hours 32 mins 1 sec
+ | @ 363 days 17 hours 32 mins 1 sec
+ | @ 1093 days 17 hours 32 mins 1 sec
+ | @ 1094 days 17 hours 32 mins 1 sec
+ | @ 1459 days 17 hours 32 mins 1 sec
+ | @ 1460 days 17 hours 32 mins 1 sec
+(54 rows)
+
+-- Test casting within a BETWEEN qualifier
+SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
+ FROM TIMESTAMPTZ_TBL
+ WHERE d1 BETWEEN timestamp with time zone '1902-01-01' AND timestamp with time zone '2038-01-01';
+ 54 | diff
+----+----------------------------------------
+ | @ 9863 days 8 hours ago
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1.00 secs
+ | @ 39 days 17 hours 32 mins 2.00 secs
+ | @ 39 days 17 hours 32 mins 1.40 secs
+ | @ 39 days 17 hours 32 mins 1.50 secs
+ | @ 39 days 17 hours 32 mins 1.60 secs
+ | @ 0
+ | @ 3 hours 4 mins 5 secs
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 159 days 16 hours 32 mins 1 sec
+ | @ 1724 days 10 hours 19 mins 20 secs
+ | @ 1168 days 8 hours 14 mins 1 sec
+ | @ 1168 days 4 hours 14 mins 2 secs
+ | @ 1168 days 2 hours 14 mins 3 secs
+ | @ 1168 days 3 hours 14 mins 4 secs
+ | @ 1168 days 1 hour 14 mins 5 secs
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 39 days 9 hours 32 mins 1 sec
+ | @ 39 days 9 hours 32 mins 1 sec
+ | @ 39 days 9 hours 32 mins 1 sec
+ | @ 159 days 17 hours 32 mins 1 sec
+ | @ 39 days 17 hours 32 mins 1 sec
+ | @ 40 days 17 hours 32 mins 1 sec
+ | @ 41 days 17 hours 32 mins 1 sec
+ | @ 42 days 17 hours 32 mins 1 sec
+ | @ 43 days 17 hours 32 mins 1 sec
+ | @ 44 days 17 hours 32 mins 1 sec
+ | @ 45 days 17 hours 32 mins 1 sec
+ | @ 45 days 17 hours 32 mins 1 sec
+ | @ 308 days 6 hours 27 mins 59 secs ago
+ | @ 307 days 6 hours 27 mins 59 secs ago
+ | @ 306 days 6 hours 27 mins 59 secs ago
+ | @ 2 days 6 hours 27 mins 59 secs ago
+ | @ 1 day 6 hours 27 mins 59 secs ago
+ | @ 6 hours 27 mins 59 secs ago
+ | @ 57 days 17 hours 32 mins 1 sec
+ | @ 58 days 17 hours 32 mins 1 sec
+ | @ 362 days 17 hours 32 mins 1 sec
+ | @ 363 days 17 hours 32 mins 1 sec
+ | @ 1093 days 17 hours 32 mins 1 sec
+ | @ 1094 days 17 hours 32 mins 1 sec
+ | @ 1459 days 17 hours 32 mins 1 sec
+ | @ 1460 days 17 hours 32 mins 1 sec
+(54 rows)
+
+SELECT '' AS "54", 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 TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+ 54 | year | month | day | hour | minute | second
+----+------+-------+-----+------+--------+----------
+ | 1969 | 12 | 31 | 16 | 0 | 0
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1.000001
+ | 1997 | 2 | 10 | 17 | 32 | 1.999999
+ | 1997 | 2 | 10 | 17 | 32 | 1.4
+ | 1997 | 2 | 10 | 17 | 32 | 1.5
+ | 1997 | 2 | 10 | 17 | 32 | 1.6
+ | 1997 | 1 | 2 | 0 | 0 | 0
+ | 1997 | 1 | 2 | 3 | 4 | 5
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 6 | 10 | 17 | 32 | 1
+ | 2001 | 9 | 22 | 11 | 19 | 20
+ | 2000 | 3 | 15 | 8 | 14 | 1
+ | 2000 | 3 | 15 | 4 | 14 | 2
+ | 2000 | 3 | 15 | 2 | 14 | 3
+ | 2000 | 3 | 15 | 3 | 14 | 4
+ | 2000 | 3 | 15 | 1 | 14 | 5
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 0
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 2 | 10 | 9 | 32 | 1
+ | 1997 | 6 | 10 | 18 | 32 | 1
+ | 1997 | 2 | 10 | 17 | 32 | 1
+ | 1997 | 2 | 11 | 17 | 32 | 1
+ | 1997 | 2 | 12 | 17 | 32 | 1
+ | 1997 | 2 | 13 | 17 | 32 | 1
+ | 1997 | 2 | 14 | 17 | 32 | 1
+ | 1997 | 2 | 15 | 17 | 32 | 1
+ | 1997 | 2 | 16 | 17 | 32 | 1
+ | 1997 | 2 | 16 | 17 | 32 | 1
+ | 1996 | 2 | 28 | 17 | 32 | 1
+ | 1996 | 2 | 29 | 17 | 32 | 1
+ | 1996 | 3 | 1 | 17 | 32 | 1
+ | 1996 | 12 | 30 | 17 | 32 | 1
+ | 1996 | 12 | 31 | 17 | 32 | 1
+ | 1997 | 1 | 1 | 17 | 32 | 1
+ | 1997 | 2 | 28 | 17 | 32 | 1
+ | 1997 | 3 | 1 | 17 | 32 | 1
+ | 1997 | 12 | 30 | 17 | 32 | 1
+ | 1997 | 12 | 31 | 17 | 32 | 1
+ | 1999 | 12 | 31 | 17 | 32 | 1
+ | 2000 | 1 | 1 | 17 | 32 | 1
+ | 2000 | 12 | 31 | 17 | 32 | 1
+ | 2001 | 1 | 1 | 17 | 32 | 1
+(54 rows)
+
+SELECT '' AS "54", date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
+ date_part( 'usec', d1) AS usec
+ FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+ 54 | quarter | msec | usec
+----+---------+----------------------+-------------------
+ | 4 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0.000999999999917733 | 0.999999999917733
+ | 1 | 999.999 | 999999
+ | 1 | 400 | 400000
+ | 1 | 500 | 500000
+ | 1 | 600 | 600000
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 2 | 0 | 0
+ | 3 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 2 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 4 | 0 | 0
+ | 4 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 1 | 0 | 0
+ | 4 | 0 | 0
+ | 4 | 0 | 0
+ | 4 | 0 | 0
+ | 1 | 0 | 0
+ | 4 | 0 | 0
+ | 1 | 0 | 0
+(54 rows)
+
+-- TO_CHAR()
+SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_1 | to_char
+-----------+------------------------------------------------------------------------------------------
+ |
+ |
+ | WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan
+ | THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun
+ | SATURDAY Saturday saturday SAT Sat sat SEPTEMBER September september IX SEP Sep sep
+ | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
+ | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
+ | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
+ | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
+ | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun
+ | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
+ | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
+ | WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb
+ | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
+ | FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb
+ | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
+ | SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb
+ | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
+ | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
+ | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
+ | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
+ | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
+ | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
+ | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
+ | SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb
+ | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
+ | WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb
+ | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
+ | FRIDAY Friday friday FRI Fri fri MARCH March march III MAR Mar mar
+ | MONDAY Monday monday MON Mon mon DECEMBER December december XII DEC Dec dec
+ | TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec
+ | WEDNESDAY Wednesday wednesday WED Wed wed JANUARY January january I JAN Jan jan
+ | FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb
+ | SATURDAY Saturday saturday SAT Sat sat MARCH March march III MAR Mar mar
+ | TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec
+ | WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec
+ | FRIDAY Friday friday FRI Fri fri DECEMBER December december XII DEC Dec dec
+ | SATURDAY Saturday saturday SAT Sat sat JANUARY January january I JAN Jan jan
+ | SUNDAY Sunday sunday SUN Sun sun DECEMBER December december XII DEC Dec dec
+ | MONDAY Monday monday MON Mon mon JANUARY January january I JAN Jan jan
+(64 rows)
+
+
+SELECT '' AS to_char_2, to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_2 | to_char
+-----------+--------------------------------------------------------------
+ |
+ |
+ | WEDNESDAY Wednesday wednesday DECEMBER December december XII
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | THURSDAY Thursday thursday JANUARY January january I
+ | THURSDAY Thursday thursday JANUARY January january I
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | TUESDAY Tuesday tuesday JUNE June june VI
+ | SATURDAY Saturday saturday SEPTEMBER September september IX
+ | WEDNESDAY Wednesday wednesday MARCH March march III
+ | WEDNESDAY Wednesday wednesday MARCH March march III
+ | WEDNESDAY Wednesday wednesday MARCH March march III
+ | WEDNESDAY Wednesday wednesday MARCH March march III
+ | WEDNESDAY Wednesday wednesday MARCH March march III
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | MONDAY Monday monday FEBRUARY February february II
+ | TUESDAY Tuesday tuesday JUNE June june VI
+ | MONDAY Monday monday FEBRUARY February february II
+ | TUESDAY Tuesday tuesday FEBRUARY February february II
+ | WEDNESDAY Wednesday wednesday FEBRUARY February february II
+ | THURSDAY Thursday thursday FEBRUARY February february II
+ | FRIDAY Friday friday FEBRUARY February february II
+ | SATURDAY Saturday saturday FEBRUARY February february II
+ | SUNDAY Sunday sunday FEBRUARY February february II
+ | TUESDAY Tuesday tuesday FEBRUARY February february II
+ | SATURDAY Saturday saturday FEBRUARY February february II
+ | THURSDAY Thursday thursday FEBRUARY February february II
+ | TUESDAY Tuesday tuesday FEBRUARY February february II
+ | SATURDAY Saturday saturday FEBRUARY February february II
+ | THURSDAY Thursday thursday FEBRUARY February february II
+ | TUESDAY Tuesday tuesday FEBRUARY February february II
+ | SUNDAY Sunday sunday FEBRUARY February february II
+ | SATURDAY Saturday saturday FEBRUARY February february II
+ | WEDNESDAY Wednesday wednesday FEBRUARY February february II
+ | THURSDAY Thursday thursday FEBRUARY February february II
+ | FRIDAY Friday friday MARCH March march III
+ | MONDAY Monday monday DECEMBER December december XII
+ | TUESDAY Tuesday tuesday DECEMBER December december XII
+ | WEDNESDAY Wednesday wednesday JANUARY January january I
+ | FRIDAY Friday friday FEBRUARY February february II
+ | SATURDAY Saturday saturday MARCH March march III
+ | TUESDAY Tuesday tuesday DECEMBER December december XII
+ | WEDNESDAY Wednesday wednesday DECEMBER December december XII
+ | FRIDAY Friday friday DECEMBER December december XII
+ | SATURDAY Saturday saturday JANUARY January january I
+ | SUNDAY Sunday sunday DECEMBER December december XII
+ | MONDAY Monday monday JANUARY January january I
+(64 rows)
+
+SELECT '' AS to_char_3, to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_3 | to_char
+-----------+-------------------------------------------------
+ |
+ |
+ | 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451
+ | 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610
+ | 2,001 2001 001 01 1 21 3 09 38 265 22 7 2452175
+ | 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 03 11 075 15 4 2451619
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610
+ | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 02 06 042 11 3 2450491
+ | 1,997 1997 997 97 7 20 1 02 07 043 12 4 2450492
+ | 1,997 1997 997 97 7 20 1 02 07 044 13 5 2450493
+ | 1,997 1997 997 97 7 20 1 02 07 045 14 6 2450494
+ | 1,997 1997 997 97 7 20 1 02 07 046 15 7 2450495
+ | 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496
+ | 0,097 0097 097 97 7 01 1 02 07 047 16 3 1686042
+ | 0,097 0097 097 97 7 01 1 02 07 047 16 7 1756536
+ | 0,597 0597 597 97 7 06 1 02 07 047 16 5 1939157
+ | 1,097 1097 097 97 7 11 1 02 07 047 16 3 2121778
+ | 1,697 1697 697 97 7 17 1 02 07 047 16 7 2340924
+ | 1,797 1797 797 97 7 18 1 02 07 047 16 5 2377448
+ | 1,897 1897 897 97 7 19 1 02 07 047 16 3 2413972
+ | 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496
+ | 2,097 2097 097 97 7 21 1 02 07 047 16 7 2487021
+ | 1,996 1996 996 96 6 20 1 02 09 059 28 4 2450142
+ | 1,996 1996 996 96 6 20 1 02 09 060 29 5 2450143
+ | 1,996 1996 996 96 6 20 1 03 09 061 01 6 2450144
+ | 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448
+ | 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449
+ | 1,997 1997 997 97 7 20 1 01 01 001 01 4 2450450
+ | 1,997 1997 997 97 7 20 1 02 09 059 28 6 2450508
+ | 1,997 1997 997 97 7 20 1 03 09 060 01 7 2450509
+ | 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813
+ | 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814
+ | 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544
+ | 2,000 2000 000 00 0 21 1 01 01 001 01 7 2451545
+ | 2,000 2000 000 00 0 21 4 12 53 366 31 1 2451910
+ | 2,001 2001 001 01 1 21 1 01 01 001 01 2 2451911
+(64 rows)
+
+
+SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_4 | to_char
+-----------+-------------------------------------------------
+ |
+ |
+ | 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451
+ | 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610
+ | 2,001 2001 001 01 1 21 3 9 38 265 22 7 2452175
+ | 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
+ | 2,000 2000 000 00 0 21 1 3 11 75 15 4 2451619
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610
+ | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
+ | 1,997 1997 997 97 7 20 1 2 6 42 11 3 2450491
+ | 1,997 1997 997 97 7 20 1 2 7 43 12 4 2450492
+ | 1,997 1997 997 97 7 20 1 2 7 44 13 5 2450493
+ | 1,997 1997 997 97 7 20 1 2 7 45 14 6 2450494
+ | 1,997 1997 997 97 7 20 1 2 7 46 15 7 2450495
+ | 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496
+ | 0,097 97 097 97 7 1 1 2 7 47 16 3 1686042
+ | 0,097 97 097 97 7 1 1 2 7 47 16 7 1756536
+ | 0,597 597 597 97 7 6 1 2 7 47 16 5 1939157
+ | 1,097 1097 097 97 7 11 1 2 7 47 16 3 2121778
+ | 1,697 1697 697 97 7 17 1 2 7 47 16 7 2340924
+ | 1,797 1797 797 97 7 18 1 2 7 47 16 5 2377448
+ | 1,897 1897 897 97 7 19 1 2 7 47 16 3 2413972
+ | 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496
+ | 2,097 2097 097 97 7 21 1 2 7 47 16 7 2487021
+ | 1,996 1996 996 96 6 20 1 2 9 59 28 4 2450142
+ | 1,996 1996 996 96 6 20 1 2 9 60 29 5 2450143
+ | 1,996 1996 996 96 6 20 1 3 9 61 1 6 2450144
+ | 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448
+ | 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449
+ | 1,997 1997 997 97 7 20 1 1 1 1 1 4 2450450
+ | 1,997 1997 997 97 7 20 1 2 9 59 28 6 2450508
+ | 1,997 1997 997 97 7 20 1 3 9 60 1 7 2450509
+ | 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813
+ | 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814
+ | 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544
+ | 2,000 2000 000 00 0 21 1 1 1 1 1 7 2451545
+ | 2,000 2000 000 00 0 21 4 12 53 366 31 1 2451910
+ | 2,001 2001 001 01 1 21 1 1 1 1 1 2 2451911
+(64 rows)
+
+
+SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_5 | to_char
+-----------+----------------------
+ |
+ |
+ | 04 04 16 00 00 57600
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 12 12 00 00 00 0
+ | 03 03 03 04 05 11045
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 11 11 11 19 20 40760
+ | 08 08 08 14 01 29641
+ | 04 04 04 14 02 15242
+ | 02 02 02 14 03 8043
+ | 03 03 03 14 04 11644
+ | 01 01 01 14 05 4445
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 00 63120
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 09 09 09 32 01 34321
+ | 09 09 09 32 01 34321
+ | 09 09 09 32 01 34321
+ | 06 06 18 32 01 66721
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+ | 05 05 17 32 01 63121
+(64 rows)
+
+SELECT '' AS to_char_6, to_char(d1, '"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_6 | to_char
+-----------+-------------------------------------------------
+ |
+ |
+ | HH:MI:SS is 04:00:00 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 12:00:00 "text between quote marks"
+ | HH:MI:SS is 03:04:05 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 11:19:20 "text between quote marks"
+ | HH:MI:SS is 08:14:01 "text between quote marks"
+ | HH:MI:SS is 04:14:02 "text between quote marks"
+ | HH:MI:SS is 02:14:03 "text between quote marks"
+ | HH:MI:SS is 03:14:04 "text between quote marks"
+ | HH:MI:SS is 01:14:05 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:00 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 09:32:01 "text between quote marks"
+ | HH:MI:SS is 09:32:01 "text between quote marks"
+ | HH:MI:SS is 09:32:01 "text between quote marks"
+ | HH:MI:SS is 06:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+ | HH:MI:SS is 05:32:01 "text between quote marks"
+(64 rows)
+
+
+SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_7 | to_char
+-----------+------------------------
+ |
+ |
+ | 16--text--00--text--00
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 00--text--00--text--00
+ | 03--text--04--text--05
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 11--text--19--text--20
+ | 08--text--14--text--01
+ | 04--text--14--text--02
+ | 02--text--14--text--03
+ | 03--text--14--text--04
+ | 01--text--14--text--05
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--00
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 09--text--32--text--01
+ | 09--text--32--text--01
+ | 09--text--32--text--01
+ | 18--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+ | 17--text--32--text--01
+(64 rows)
+
+SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_8 | to_char
+-----------+-------------------------
+ |
+ |
+ | 1969TH 1969th 2440587th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450451st
+ | 1997TH 1997th 2450451st
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450610th
+ | 2001ST 2001st 2452175th
+ | 2000TH 2000th 2451619th
+ | 2000TH 2000th 2451619th
+ | 2000TH 2000th 2451619th
+ | 2000TH 2000th 2451619th
+ | 2000TH 2000th 2451619th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450610th
+ | 1997TH 1997th 2450490th
+ | 1997TH 1997th 2450491st
+ | 1997TH 1997th 2450492nd
+ | 1997TH 1997th 2450493rd
+ | 1997TH 1997th 2450494th
+ | 1997TH 1997th 2450495th
+ | 1997TH 1997th 2450496th
+ | 0097TH 0097th 1686042nd
+ | 0097TH 0097th 1756536th
+ | 0597TH 0597th 1939157th
+ | 1097TH 1097th 2121778th
+ | 1697TH 1697th 2340924th
+ | 1797TH 1797th 2377448th
+ | 1897TH 1897th 2413972nd
+ | 1997TH 1997th 2450496th
+ | 2097TH 2097th 2487021st
+ | 1996TH 1996th 2450142nd
+ | 1996TH 1996th 2450143rd
+ | 1996TH 1996th 2450144th
+ | 1996TH 1996th 2450448th
+ | 1996TH 1996th 2450449th
+ | 1997TH 1997th 2450450th
+ | 1997TH 1997th 2450508th
+ | 1997TH 1997th 2450509th
+ | 1997TH 1997th 2450813th
+ | 1997TH 1997th 2450814th
+ | 1999TH 1999th 2451544th
+ | 2000TH 2000th 2451545th
+ | 2000TH 2000th 2451910th
+ | 2001ST 2001st 2451911th
+(64 rows)
+
+
+SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm')
+ FROM TIMESTAMPTZ_TBL;
+ to_char_9 | to_char
+-----------+---------------------------------------------------------------------
+ |
+ |
+ | 1969 A.D. 1969 a.d. 1969 ad 04:00:00 P.M. 04:00:00 p.m. 04:00:00 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 12:00:00 A.M. 12:00:00 a.m. 12:00:00 am
+ | 1997 A.D. 1997 a.d. 1997 ad 03:04:05 A.M. 03:04:05 a.m. 03:04:05 am
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 2001 A.D. 2001 a.d. 2001 ad 11:19:20 A.M. 11:19:20 a.m. 11:19:20 am
+ | 2000 A.D. 2000 a.d. 2000 ad 08:14:01 A.M. 08:14:01 a.m. 08:14:01 am
+ | 2000 A.D. 2000 a.d. 2000 ad 04:14:02 A.M. 04:14:02 a.m. 04:14:02 am
+ | 2000 A.D. 2000 a.d. 2000 ad 02:14:03 A.M. 02:14:03 a.m. 02:14:03 am
+ | 2000 A.D. 2000 a.d. 2000 ad 03:14:04 A.M. 03:14:04 a.m. 03:14:04 am
+ | 2000 A.D. 2000 a.d. 2000 ad 01:14:05 A.M. 01:14:05 a.m. 01:14:05 am
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:00 P.M. 05:32:00 p.m. 05:32:00 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
+ | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
+ | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
+ | 1997 A.D. 1997 a.d. 1997 ad 06:32:01 P.M. 06:32:01 p.m. 06:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 0097 B.C. 0097 b.c. 0097 bc 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 0097 A.D. 0097 a.d. 0097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 0597 A.D. 0597 a.d. 0597 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1097 A.D. 1097 a.d. 1097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1697 A.D. 1697 a.d. 1697 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1797 A.D. 1797 a.d. 1797 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1897 A.D. 1897 a.d. 1897 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 2097 A.D. 2097 a.d. 2097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 1999 A.D. 1999 a.d. 1999 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+ | 2001 A.D. 2001 a.d. 2001 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
+(64 rows)
+
+-- TO_TIMESTAMP()
+SELECT '' AS to_timestamp_1, to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
+ to_timestamp_1 | to_timestamp
+----------------+--------------------------
+ | Sat Feb 16 08:14:30 0097
+(1 row)
+
+
+SELECT '' AS to_timestamp_2, to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
+ to_timestamp_2 | to_timestamp
+----------------+--------------------------
+ | Sat Feb 16 08:14:30 0097
+(1 row)
+
+SELECT '' AS to_timestamp_3, to_timestamp('1985 January 12', 'YYYY FMMonth DD');
+ to_timestamp_3 | to_timestamp
+----------------+------------------------------
+ | Sat Jan 12 00:00:00 1985 PST
+(1 row)
+
+SELECT '' AS to_timestamp_4, to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
+ '"My birthday-> Year" YYYY, "Month:" FMMonth, "Day:" DD');
+ to_timestamp_4 | to_timestamp
+----------------+------------------------------
+ | Sun May 16 00:00:00 1976 PDT
+(1 row)
+
+SELECT '' AS to_timestamp_5, to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
+ to_timestamp_5 | to_timestamp
+----------------+--------------------------
+ | Sat Aug 21 00:00:00 1582
+(1 row)
+
+SELECT '' AS to_timestamp_6, to_timestamp('15 "text between quote marks" 98 54 45',
+ 'HH "\\text between quote marks\\"" YY MI SS');
+ to_timestamp_6 | to_timestamp
+----------------+------------------------------
+ | Thu Jan 01 15:54:45 1998 PST
+(1 row)
+
+
+SELECT '' AS to_timestamp_7, to_timestamp('05121445482000', 'MMDDHHMISSYYYY');
+ to_timestamp_7 | to_timestamp
+----------------+------------------------------
+ | Fri May 12 14:45:48 2000 PDT
+(1 row)
+
+SELECT '' AS to_timestamp_8, to_timestamp('2000January09Sunday', 'YYYYFMMonthDDFMDay');
+ to_timestamp_8 | to_timestamp
+----------------+------------------------------
+ | Sun Jan 09 00:00:00 2000 PST
+(1 row)
+
+SELECT '' AS to_timestamp_9, to_timestamp('97/Feb/16', 'YYMonDD');
+ERROR: to_timestamp(): bad value for MON/Mon/mon
+SELECT '' AS to_timestamp_10, to_timestamp('19971116', 'YYYYMMDD');
+ to_timestamp_10 | to_timestamp
+-----------------+------------------------------
+ | Sun Nov 16 00:00:00 1997 PST
+(1 row)
+
+SELECT '' AS to_timestamp_11, to_timestamp('20000-1116', 'YYYY-MMDD');
+ to_timestamp_11 | to_timestamp
+-----------------+---------------------------
+ | Thu Nov 16 00:00:00 20000
+(1 row)
+
+SELECT '' AS to_timestamp_12, to_timestamp('9-1116', 'Y-MMDD');
+ to_timestamp_12 | to_timestamp
+-----------------+------------------------------
+ | Mon Nov 16 00:00:00 2009 PST
+(1 row)
+
+SELECT '' AS to_timestamp_13, to_timestamp('95-1116', 'YY-MMDD');
+ to_timestamp_13 | to_timestamp
+-----------------+------------------------------
+ | Thu Nov 16 00:00:00 1995 PST
+(1 row)
+
+SELECT '' AS to_timestamp_14, to_timestamp('995-1116', 'YYY-MMDD');
+ to_timestamp_14 | to_timestamp
+-----------------+------------------------------
+ | Thu Nov 16 00:00:00 1995 PST
+(1 row)
+
+SET DateStyle TO DEFAULT;
--- /dev/null
+--
+-- TIMETZ
+--
+CREATE TABLE TIMETZ_TBL (f1 time with time zone);
+INSERT INTO TIMETZ_TBL VALUES ('00:01 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('01:00 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('02:03 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('07:07 PST');
+INSERT INTO TIMETZ_TBL VALUES ('08:08 EDT');
+INSERT INTO TIMETZ_TBL VALUES ('11:59 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('12:00 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('12:01 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('23:59 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('11:59:59.99 PM PDT');
+SELECT f1 AS "Time TZ" FROM TIMETZ_TBL;
+ Time TZ
+-------------
+ 00:01:00-07
+ 01:00:00-07
+ 02:03:00-07
+ 07:07:00-08
+ 08:08:00-04
+ 11:59:00-07
+ 12:00:00-07
+ 12:01:00-07
+ 23:59:00-07
+ 23:59:59-07
+(10 rows)
+
+SELECT f1 AS "Three" FROM TIMETZ_TBL WHERE f1 < '05:06:07';
+ Three
+-------------
+ 00:01:00-07
+ 01:00:00-07
+ 02:03:00-07
+(3 rows)
+
+SELECT f1 AS "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07';
+ Seven
+-------------
+ 07:07:00-08
+ 08:08:00-04
+ 11:59:00-07
+ 12:00:00-07
+ 12:01:00-07
+ 23:59:00-07
+ 23:59:59-07
+(7 rows)
+
+SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00';
+ None
+------
+(0 rows)
+
+SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00';
+ Ten
+-------------
+ 00:01:00-07
+ 01:00:00-07
+ 02:03:00-07
+ 07:07:00-08
+ 08:08:00-04
+ 11:59:00-07
+ 12:00:00-07
+ 12:01:00-07
+ 23:59:00-07
+ 23:59:59-07
+(10 rows)
+
+--
+-- TIME simple math
+--
+-- We now make a distinction between time and intervals,
+-- and adding two times together makes no sense at all.
+-- Leave in one query to show that it is rejected,
+-- and do the rest of the testing in horology.sql
+-- where we do mixed-type arithmetic. - thomas 2000-12-02
+SELECT f1 + time with time zone '00:01' AS "Illegal" FROM TIMETZ_TBL;
+ERROR: Unable to identify an operator '+' for types 'time with time zone' and 'time with time zone'
+ You will have to retype this query using an explicit cast
-- TINTERVAL
--
CREATE TABLE TINTERVAL_TBL (f1 tinterval);
+-- Should accept any abstime,
+-- so do not bother with extensive testing of values
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["-infinity" "infinity"]');
INSERT INTO TINTERVAL_TBL (f1)
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["epoch" "Mon May 1 00:30:30 1995"]');
INSERT INTO TINTERVAL_TBL (f1)
- VALUES ('["Feb 15 1990 12:15:03" "current"]');
+ VALUES ('["Feb 15 1990 12:15:03" "2001-09-23 11:12:13"]');
-- badly formatted tintervals
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["bad time specifications" ""]');
| ["-infinity" "infinity"]
| ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
(5 rows)
-- length ==
three | f1
-------+-----------------------------------------------------------------
| ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
(3 rows)
-- length <
three | f1
-------+-----------------------------------------------------------------
| ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
(3 rows)
-- length >=
three | f1
-------+-----------------------------------------------------------------
| ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
(3 rows)
-- overlaps
-------+-----------------------------------------------------------------
| ["-infinity" "infinity"]
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
(3 rows)
SET geqo TO 'off';
------+-----------------------------------------------------------------+-----------------------------------------------------------------
| ["-infinity" "infinity"] | ["-infinity" "infinity"]
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"] | ["Thu Feb 15 12:15:03 1990 PST" "current"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
| ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
(5 rows)
fourteen | interval1 | interval2
----------+-----------------------------------------------------------------+-----------------------------------------------------------------
| ["-infinity" "infinity"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
- | ["-infinity" "infinity"] | ["Thu Feb 15 12:15:03 1990 PST" "current"]
- | ["-infinity" "infinity"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
+ | ["-infinity" "infinity"] | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
+ | ["-infinity" "infinity"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
| ["-infinity" "infinity"] | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] | ["-infinity" "infinity"]
- | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"] | ["-infinity" "infinity"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"] | ["-infinity" "infinity"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"] | ["Thu Feb 15 12:15:03 1990 PST" "current"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"] | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
+ | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] | ["-infinity" "infinity"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["-infinity" "infinity"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
| ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] | ["-infinity" "infinity"]
- | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
(14 rows)
-- contains
five | f1
------+-----------------------------------------------------------------
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
- | ["Thu Feb 15 12:15:03 1990 PST" "current"]
+ | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"]
| ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"]
(3 rows)
-------+-----------------------------------------------------------------
| ["-infinity" "infinity"]
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
- | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
+ | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"]
(3 rows)
RESET geqo;
text_tbl
time_tbl
timestamp_tbl
+ timestamptz_tbl
+ timetz_tbl
tinterval_tbl
toyemp
varchar_tbl
xacttest
-(91 rows)
+(93 rows)
--SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))) AS equip_name;
SELECT hobbies_by_name('basketball');
# ----------
# The second group of parallel test
# ----------
-test: point lseg box path polygon circle date time timestamp interval abstime reltime tinterval inet comments oidjoins type_sanity opr_sanity
+test: point lseg box path polygon circle date time timestamp timestamptz interval abstime reltime tinterval inet comments oidjoins type_sanity opr_sanity
# Depends on point, lseg, box, path, polygon and circle
test: geometry
-# Depends on interval, timestamp, reltime and abstime
+# Depends on interval, timestamp, timestamptz, reltime and abstime
test: horology
# ----------
-# $Header: /cvsroot/pgsql/src/test/regress/serial_schedule,v 1.6 2001/06/12 16:34:27 momjian Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/serial_schedule,v 1.7 2001/09/28 07:59:38 thomas Exp $
# This should probably be in an order similar to parallel_schedule.
test: boolean
test: char
test: circle
test: date
test: time
+test: timetz
test: timestamp
+test: timestamptz
test: interval
test: abstime
test: reltime
CREATE TABLE ABSTIME_TBL (f1 abstime);
-INSERT INTO ABSTIME_TBL (f1) VALUES ('Jan 14, 1973 03:14:21');
+BEGIN;
+INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'current');
+INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now');
+SELECT count(*) AS two FROM ABSTIME_TBL WHERE f1 = 'now' ;
+END;
--- was INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now'):
-INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'Mon May 1 00:30:30 1995');
+DELETE FROM ABSTIME_TBL;
+INSERT INTO ABSTIME_TBL (f1) VALUES ('Jan 14, 1973 03:14:21');
+INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'Mon May 1 00:30:30 1995');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'epoch');
-
-INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'current');
-
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'infinity');
-
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime '-infinity');
-
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'May 10, 1947 23:59:12');
-
-- what happens if we specify slightly misformatted abstime?
INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00');
-
INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10');
-
-- badly formatted abstimes: these should result in invalid abstimes
INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format');
-
INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843');
-- test abstime operators
SELECT '' AS six, ABSTIME_TBL.*
WHERE abstime 'May 10, 1947 23:59:12' <> ABSTIME_TBL.f1;
-SELECT '' AS one, ABSTIME_TBL.*
- WHERE abstime 'current' = ABSTIME_TBL.f1;
-
SELECT '' AS three, ABSTIME_TBL.*
WHERE abstime 'epoch' >= ABSTIME_TBL.f1;
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 <> abstime 'current'
+ WHERE isfinite(f1)
ORDER BY abstime;
--
-- HOROLOGY
--
+-- needed so tests pass even in Australia
+SET australian_timezones = 'off';
+SET DateStyle = 'Postgres,US';
+
--
-- date, time arithmetic
--
--- needed so tests pass
-SET australian_timezones = 'off';
SELECT date '1981-02-03' + time '04:05:06' AS "Date + Time";
-
SELECT date '1991-02-03' + time with time zone '04:05:06 PST' AS "Date + Time PST";
-
SELECT date '2001-02-03' + time with time zone '04:05:06 UTC' AS "Date + Time UTC";
-
SELECT date '1991-02-03' + interval '2 years' AS "Add Two Years";
-
SELECT date '2001-12-13' - interval '2 years' AS "Subtract Two Years";
-
+-- subtract time from date should not make sense; use interval instead
SELECT date '1991-02-03' - time '04:05:06' AS "Subtract Time";
-
SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time UTC";
--
-- timestamp, interval arithmetic
--
-SELECT timestamp '1996-03-01' - interval '1 second' AS "Feb 29";
-
-SELECT timestamp '1999-03-01' - interval '1 second' AS "Feb 28";
-
-SELECT timestamp '2000-03-01' - interval '1 second' AS "Feb 29";
-
-SELECT timestamp '1999-12-01' + interval '1 month - 1 second' AS "Dec 31";
+SELECT timestamp without time zone '1996-03-01' - interval '1 second' AS "Feb 29";
+SELECT timestamp without time zone '1999-03-01' - interval '1 second' AS "Feb 28";
+SELECT timestamp without time zone '2000-03-01' - interval '1 second' AS "Feb 29";
+SELECT timestamp without time zone '1999-12-01' + interval '1 month - 1 second' AS "Dec 31";
+
+-- Shorthand values
+-- Not directly usable for regression testing since these are not constants.
+-- So, just try to test parser and hope for the best - thomas 97/04/26
+SELECT (timestamp without time zone 'today' = (timestamp without time zone 'yesterday' + interval '1 day')) as "True";
+SELECT (timestamp without time zone 'today' = (timestamp without time zone 'tomorrow' - interval '1 day')) as "True";
+SELECT (timestamp without time zone 'tomorrow' = (timestamp without time zone 'yesterday' + interval '2 days')) as "True";
+SELECT (timestamp without time zone 'tomorrow' > 'now') as "True";
+
+SELECT timestamp(date '1994-01-01', time '11:00') AS "Jan_01_1994_11am";
+SELECT timestamp(date '1994-01-01', time '10:00') AS "Jan_01_1994_10am";
+SELECT timestamp(date '1994-01-01', time '11:00-5') AS "Jan_01_1994_8am";
+SELECT timestamp(date '1994-01-01', time with time zone '11:00-5') AS "Jan_01_1994_11am";
+
+SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMP_TBL;
+SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMP_TBL;
+
+SELECT timestamp with time zone '1996-03-01' - interval '1 second' AS "Feb 29";
+SELECT timestamp with time zone '1999-03-01' - interval '1 second' AS "Feb 28";
+SELECT timestamp with time zone '2000-03-01' - interval '1 second' AS "Feb 29";
+SELECT timestamp with time zone '1999-12-01' + interval '1 month - 1 second' AS "Dec 31";
+
+SELECT (timestamp with time zone 'today' = (timestamp with time zone 'yesterday' + interval '1 day')) as "True";
+SELECT (timestamp with time zone 'today' = (timestamp with time zone 'tomorrow' - interval '1 day')) as "True";
+SELECT (timestamp with time zone 'tomorrow' = (timestamp with time zone 'yesterday' + interval '2 days')) as "True";
+SELECT (timestamp with time zone 'tomorrow' > 'now') as "True";
+
+SELECT timestamptz(date '1994-01-01', time '11:00') AS "Jan_01_1994_10am";
+SELECT timestamptz(date '1994-01-01', time '10:00') AS "Jan_01_1994_9am";
+SELECT timestamptz(date '1994-01-01', time with time zone '11:00-8') AS "Jan_01_1994_11am";
+SELECT timestamptz(date '1994-01-01', time with time zone '10:00-8') AS "Jan_01_1994_10am";
+SELECT timestamptz(date '1994-01-01', time with time zone '11:00-5') AS "Jan_01_1994_8am";
+
+SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
+SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
--
-- time, interval arithmetic
--
SELECT CAST(time '01:02' AS interval) AS "+01:02";
-
SELECT CAST(interval '02:03' AS time) AS "02:03:00";
-
SELECT time '01:30' + interval '02:01' AS "03:31:00";
-
SELECT time '01:30' - interval '02:01' AS "23:29:00";
-
SELECT time '02:30' + interval '36:01' AS "14:31:00";
-
SELECT time '03:30' + interval '1 month 04:01' AS "07:31:00";
-
-SELECT interval '04:30' - time '01:02' AS "+03:28";
-
+SELECT interval '04:30' - time '01:02' AS "20:32:00";
SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
-
SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
-
SELECT time with time zone '01:30-08' - interval '02:01' AS "23:29:00-08";
-
SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
-- These two tests cannot be used because they default to current timezone,
-- SELECT time with time zone '03:30' + interval '1 month 04:01' AS "07:31:00-08";
-- Try the following two tests instead, as a poor substitute
-SELECT CAST(date 'today' + time with time zone '01:30'
- + interval '02:01' AS time) AS "03:31:00";
+SELECT CAST(CAST(date 'today' + time with time zone '01:30'
+ + interval '02:01' AS time with time zone) AS time) AS "03:31:00";
-SELECT CAST(date 'today' + time with time zone '03:30'
- + interval '1 month 04:01' AS time) AS "07:31:00";
+SELECT CAST(CAST(date 'today' + time with time zone '03:30'
+ + interval '1 month 04:01' AS time with time zone) AS time) AS "07:31:00";
-SELECT interval '04:30' - time with time zone '01:02' AS "+03:28";
+SELECT interval '04:30' - time with time zone '01:02-05' AS "20:32:00-05";
--- We get 100 rows when run in GMT...
SELECT t.d1 + i.f1 AS "102" FROM TIMESTAMP_TBL t, INTERVAL_TBL i
WHERE t.d1 BETWEEN '1990-01-01' AND '2001-01-01'
AND i.f1 BETWEEN '00:00' AND '23:00';
AND i.f1 BETWEEN '00:00' AND '23:00';
SELECT t.f1 + i.f1 AS "80" FROM TIME_TBL t, INTERVAL_TBL i;
-
SELECT t.f1 - i.f1 AS "80" FROM TIME_TBL t, INTERVAL_TBL i;
-SELECT t.f2 + i.f1 AS "80" FROM TIME_TBL t, INTERVAL_TBL i;
-
-SELECT t.f2 - i.f1 AS "80" FROM TIME_TBL t, INTERVAL_TBL i;
+SELECT t.f1 + i.f1 AS "100" FROM TIMETZ_TBL t, INTERVAL_TBL i;
+SELECT t.f1 - i.f1 AS "100" FROM TIMETZ_TBL t, INTERVAL_TBL i;
-- SQL9x OVERLAPS operator
+-- test with time zone
+SELECT (timestamp with time zone '2000-11-27', timestamp with time zone '2000-11-28')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', timestamp with time zone '2000-11-30') AS "True";
+
+SELECT (timestamp with time zone '2000-11-26', timestamp with time zone '2000-11-27')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', timestamp with time zone '2000-11-30') AS "False";
+
+SELECT (timestamp with time zone '2000-11-27', timestamp with time zone '2000-11-28')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', interval '1 day') AS "True";
+
+SELECT (timestamp with time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', timestamp with time zone '2000-11-30') AS "False";
+
+SELECT (timestamp with time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp with time zone '2000-11-27', interval '12 hours') AS "True";
+
+SELECT (timestamp with time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp with time zone '2000-11-27 12:00', interval '12 hours') AS "False";
-SELECT (timestamp '2000-11-27', timestamp '2000-11-28')
- OVERLAPS (timestamp '2000-11-27 12:00', timestamp '2000-11-30') AS "True";
+-- test without time zone
+SELECT (timestamp without time zone '2000-11-27', timestamp without time zone '2000-11-28')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', timestamp without time zone '2000-11-30') AS "True";
-SELECT (timestamp '2000-11-26', timestamp '2000-11-27')
- OVERLAPS (timestamp '2000-11-27 12:00', timestamp '2000-11-30') AS "False";
+SELECT (timestamp without time zone '2000-11-26', timestamp without time zone '2000-11-27')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', timestamp without time zone '2000-11-30') AS "False";
-SELECT (timestamp '2000-11-27', timestamp '2000-11-28')
- OVERLAPS (timestamp '2000-11-27 12:00', interval '1 day') AS "True";
+SELECT (timestamp without time zone '2000-11-27', timestamp without time zone '2000-11-28')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', interval '1 day') AS "True";
-SELECT (timestamp '2000-11-27', interval '12 hours')
- OVERLAPS (timestamp '2000-11-27 12:00', timestamp '2000-11-30') AS "False";
+SELECT (timestamp without time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', timestamp without time zone '2000-11-30') AS "False";
-SELECT (timestamp '2000-11-27', interval '12 hours')
- OVERLAPS (timestamp '2000-11-27', interval '12 hours') AS "True";
+SELECT (timestamp without time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp without time zone '2000-11-27', interval '12 hours') AS "True";
-SELECT (timestamp '2000-11-27', interval '12 hours')
- OVERLAPS (timestamp '2000-11-27 12:00', interval '12 hours') AS "False";
+SELECT (timestamp without time zone '2000-11-27', interval '12 hours')
+ OVERLAPS (timestamp without time zone '2000-11-27 12:00', interval '12 hours') AS "False";
+-- test time and interval
SELECT (time '00:00', time '01:00')
OVERLAPS (time '00:30', time '01:30') AS "True";
SELECT (time '00:00', interval '1 hour')
OVERLAPS (time '01:30', interval '1 hour') AS "False";
+-- SQL99 seems to want this to be false (and we conform to the spec).
+-- istm that this *should* return true, on the theory that time
+-- intervals can wrap around the day boundary - thomas 2001-09-25
SELECT (time '00:00', interval '1 hour')
- OVERLAPS (time '01:30', interval '1 day') AS "True";
+ OVERLAPS (time '01:30', interval '1 day') AS "False";
CREATE TABLE TEMP_TIMESTAMP (f1 timestamp);
WHERE d1 BETWEEN '13-jun-1957' AND '1-jan-1997'
OR d1 BETWEEN '1-jan-1999' AND '1-jan-2010';
-SELECT '' AS "15", f1 AS timestamp
+SELECT '' AS "16", f1 AS timestamp
FROM TEMP_TIMESTAMP
ORDER BY timestamp;
-SELECT '' AS "150", d.f1 AS timestamp, t.f1 AS interval, d.f1 + t.f1 AS plus
+SELECT '' AS "160", d.f1 AS timestamp, t.f1 AS interval, d.f1 + t.f1 AS plus
FROM TEMP_TIMESTAMP d, INTERVAL_TBL t
ORDER BY plus, timestamp, interval;
-SELECT '' AS "150", d.f1 AS timestamp, t.f1 AS interval, d.f1 - t.f1 AS minus
+SELECT '' AS "160", d.f1 AS timestamp, t.f1 AS interval, d.f1 - t.f1 AS minus
FROM TEMP_TIMESTAMP d, INTERVAL_TBL t
WHERE isfinite(d.f1)
ORDER BY minus, timestamp, interval;
-SELECT '' AS "15", d.f1 AS timestamp, timestamp '1980-01-06 00:00 GMT' AS gpstime_zero,
+SELECT '' AS "16", d.f1 AS timestamp, timestamp '1980-01-06 00:00 GMT' AS gpstime_zero,
d.f1 - timestamp '1980-01-06 00:00 GMT' AS difference
FROM TEMP_TIMESTAMP d
ORDER BY difference;
-SELECT '' AS "225", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS difference
+SELECT '' AS "226", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS difference
FROM TEMP_TIMESTAMP d1, TEMP_TIMESTAMP d2
ORDER BY timestamp1, timestamp2, difference;
-SELECT '' as "54", d1 as timestamp,
+SELECT '' as "55", d1 as timestamp,
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
--
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
- WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
- < abstime 'Jan 14 14:00:00 1971'
+ WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1) < abstime 'Jan 14 14:00:00 1971'
ORDER BY abstime, reltime;
-- these four queries should return the same answer
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
- < abstime 'Jan 14 14:00:00 1977';
+ < abstime 'Jan 14 14:00:00 1977';
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
- < abstime 'Jan 14 14:00:00 1971';
+ < abstime 'Jan 14 14:00:00 1971';
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
- < abstime 'Jan 14 14:00:00 1971';
+ < abstime 'Jan 14 14:00:00 1971';
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
- < abstime 'Jan 14 14:00:00 1977';
+ < abstime 'Jan 14 14:00:00 1977';
--
-- Conversions
--
-SELECT '' AS "15", f1 AS timestamp, date( f1) AS date
+SELECT '' AS "16", f1 AS timestamp, date(f1) AS date
FROM TEMP_TIMESTAMP
WHERE f1 <> timestamp 'current'
ORDER BY date, timestamp;
-SELECT '' AS "15", f1 AS timestamp, abstime( f1) AS abstime
+SELECT '' AS "16", f1 AS timestamp, abstime(f1) AS abstime
FROM TEMP_TIMESTAMP
ORDER BY abstime;
-SELECT '' AS four, f1 AS abstime, date( f1) AS date
+SELECT '' AS four, f1 AS abstime, date(f1) AS date
FROM ABSTIME_TBL
WHERE isfinite(f1) AND f1 <> abstime 'current'
ORDER BY date, abstime;
-SELECT '' AS five, d1 AS timestamp, abstime(d1) AS abstime
+SELECT '' AS two, d1 AS timestamp, abstime(d1) AS abstime
FROM TIMESTAMP_TBL WHERE NOT isfinite(d1);
SELECT '' AS three, f1 as abstime, timestamp(f1) AS timestamp
FROM ABSTIME_TBL WHERE NOT isfinite(f1);
-SELECT '' AS ten, f1 AS interval, reltime( f1) AS reltime
+SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime
FROM INTERVAL_TBL;
-SELECT '' AS six, f1 as reltime, interval( f1) AS interval
+SELECT '' AS six, f1 as reltime, interval(f1) AS interval
FROM RELTIME_TBL;
DROP TABLE TEMP_TIMESTAMP;
SHOW DateStyle;
-SELECT '' AS "66", d1 AS us_postgres FROM TIMESTAMP_TBL;
+SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
-SELECT '' AS eight, f1 AS us_postgres FROM ABSTIME_TBL;
+SELECT '' AS seven, f1 AS us_postgres FROM ABSTIME_TBL;
SET DateStyle TO 'US,ISO';
-SELECT '' AS "66", d1 AS us_iso FROM TIMESTAMP_TBL;
+SELECT '' AS "64", d1 AS us_iso FROM TIMESTAMP_TBL;
-SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
+SELECT '' AS seven, f1 AS us_iso FROM ABSTIME_TBL;
SET DateStyle TO 'US,SQL';
SHOW DateStyle;
-SELECT '' AS "66", d1 AS us_sql FROM TIMESTAMP_TBL;
+SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
-SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
+SELECT '' AS seven, f1 AS us_sql FROM ABSTIME_TBL;
SET DateStyle TO 'European,Postgres';
SELECT count(*) as one FROM TIMESTAMP_TBL WHERE d1 = 'Jun 13 1957';
-SELECT '' AS "67", d1 AS european_postgres FROM TIMESTAMP_TBL;
+SELECT '' AS "65", d1 AS european_postgres FROM TIMESTAMP_TBL;
-SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
+SELECT '' AS seven, f1 AS european_postgres FROM ABSTIME_TBL;
SET DateStyle TO 'European,ISO';
SHOW DateStyle;
-SELECT '' AS "67", d1 AS european_iso FROM TIMESTAMP_TBL;
+SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
-SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
+SELECT '' AS seven, f1 AS european_iso FROM ABSTIME_TBL;
SET DateStyle TO 'European,SQL';
SHOW DateStyle;
-SELECT '' AS "67", d1 AS european_sql FROM TIMESTAMP_TBL;
+SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;
-SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
+SELECT '' AS seven, f1 AS european_sql FROM ABSTIME_TBL;
RESET DateStyle;
-- implemented using int4larger/int4smaller. Until we have
-- some cleaner way of dealing with binary-equivalent types, just leave
-- those two tuples in the expected output.
-
SELECT p1.oid, p1.aggname, p2.oid, p2.proname
FROM pg_aggregate AS p1, pg_proc AS p2
WHERE p1.aggtransfn = p2.oid AND
-- TIME
--
-CREATE TABLE TIME_TBL (f1 time, f2 time with time zone);
+CREATE TABLE TIME_TBL (f1 time);
-INSERT INTO TIME_TBL VALUES ('00:00', '00:00 PDT');
-INSERT INTO TIME_TBL VALUES ('01:00', '01:00 PDT');
-INSERT INTO TIME_TBL VALUES ('02:03', '02:03 PDT');
-INSERT INTO TIME_TBL VALUES ('11:59', '11:59 PDT');
-INSERT INTO TIME_TBL VALUES ('12:00', '12:00 PDT');
-INSERT INTO TIME_TBL VALUES ('12:01', '12:01 PDT');
-INSERT INTO TIME_TBL VALUES ('23:59', '23:59 PDT');
-INSERT INTO TIME_TBL VALUES ('11:59:59.99 PM', '11:59:59.99 PM PDT');
+INSERT INTO TIME_TBL VALUES ('00:00');
+INSERT INTO TIME_TBL VALUES ('01:00');
+INSERT INTO TIME_TBL VALUES ('02:03');
+INSERT INTO TIME_TBL VALUES ('07:07 PST');
+INSERT INTO TIME_TBL VALUES ('08:08 EDT');
+INSERT INTO TIME_TBL VALUES ('11:59');
+INSERT INTO TIME_TBL VALUES ('12:00');
+INSERT INTO TIME_TBL VALUES ('12:01');
+INSERT INTO TIME_TBL VALUES ('23:59');
+INSERT INTO TIME_TBL VALUES ('11:59:59.99 PM');
-SELECT f1 AS "Time", f2 AS "Time TZ" FROM TIME_TBL;
+SELECT f1 AS "Time" FROM TIME_TBL;
SELECT f1 AS "Three" FROM TIME_TBL WHERE f1 < '05:06:07';
-- where we do mixed-type arithmetic. - thomas 2000-12-02
SELECT f1 + time '00:01' AS "Illegal" FROM TIME_TBL;
-
-SELECT f2 + time with time zone '00:01' AS "Illegal" FROM TIME_TBL;
--
--- DATETIME
+-- TIMESTAMP
--
--- Shorthand values
--- Not directly usable for regression testing since these are not constants.
--- So, just try to test parser and hope for the best - thomas 97/04/26
--- needed so tests pass
+-- needed so tests pass even in Australia
SET australian_timezones = 'off';
-SELECT (timestamp 'today' = (timestamp 'yesterday' + interval '1 day')) as "True";
-SELECT (timestamp 'today' = (timestamp 'tomorrow' - interval '1 day')) as "True";
-SELECT (timestamp 'tomorrow' = (timestamp 'yesterday' + interval '2 days')) as "True";
-SELECT (timestamp 'current' = 'now') as "True";
-SELECT (timestamp 'now' - 'current') AS "ZeroSecs";
-
-SET DateStyle = 'Postgres,NonEuropean';
-SELECT timestamp(date '1994-01-01', time '11:00') AS "Jan_01_1994_11am";
-SELECT timestamp(date '1994-01-01', time '10:00') AS "Jan_01_1994_10am";
-SELECT timestamp(date '1994-01-01', time with time zone '11:00-5') AS "Jan_01_1994_8am";
+CREATE TABLE TIMESTAMP_TBL ( d1 timestamp without time zone);
-CREATE TABLE TIMESTAMP_TBL ( d1 timestamp);
+-- Shorthand values
+-- Not directly usable for regression testing since these are not constants.
+-- So, just try to test parser and hope for the best - thomas 97/04/26
+INSERT INTO TIMESTAMP_TBL VALUES ('now');
INSERT INTO TIMESTAMP_TBL VALUES ('current');
INSERT INTO TIMESTAMP_TBL VALUES ('today');
INSERT INTO TIMESTAMP_TBL VALUES ('yesterday');
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow EST');
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow zulu');
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today';
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'tomorrow';
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'yesterday';
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today' + interval '1 day';
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today' - interval '1 day';
-
-SELECT count(*) AS one FROM TIMESTAMP_TBL WHERE d1 = timestamp 'now';
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'today';
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'tomorrow';
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'yesterday';
+SELECT count(*) AS None FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'now';
DELETE FROM TIMESTAMP_TBL;
-- verify uniform transaction time within transaction block
-INSERT INTO TIMESTAMP_TBL VALUES ('current');
BEGIN;
INSERT INTO TIMESTAMP_TBL VALUES ('now');
-SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp 'now';
+INSERT INTO TIMESTAMP_TBL VALUES ('now');
+SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp without time zone 'now';
END;
DELETE FROM TIMESTAMP_TBL;
-- Special values
-INSERT INTO TIMESTAMP_TBL VALUES ('invalid');
INSERT INTO TIMESTAMP_TBL VALUES ('-infinity');
INSERT INTO TIMESTAMP_TBL VALUES ('infinity');
INSERT INTO TIMESTAMP_TBL VALUES ('epoch');
+-- Obsolete special values
+INSERT INTO TIMESTAMP_TBL VALUES ('invalid');
-- Postgres v6.0 standard output format
INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01 -08:00');
INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 -0800');
INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 17:32:01 -07:00');
+INSERT INTO TIMESTAMP_TBL VALUES ('2001-09-22T18:19:20');
-- POSIX format
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 -0097');
INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 5097 BC');
-SELECT '' AS "66", d1 FROM TIMESTAMP_TBL;
+SELECT '' AS "64", d1 FROM TIMESTAMP_TBL;
-- Demonstrate functions and operators
-SELECT '' AS "47", d1 FROM TIMESTAMP_TBL
- WHERE d1 > timestamp '1997-01-02' and d1 != timestamp 'current';
+SELECT '' AS "48", d1 FROM TIMESTAMP_TBL
+ WHERE d1 > timestamp without time zone '1997-01-02';
SELECT '' AS "15", d1 FROM TIMESTAMP_TBL
- WHERE d1 < timestamp '1997-01-02' and d1 != timestamp 'current';
+ WHERE d1 < timestamp without time zone '1997-01-02';
SELECT '' AS one, d1 FROM TIMESTAMP_TBL
- WHERE d1 = timestamp '1997-01-02' and d1 != timestamp 'current';
+ WHERE d1 = timestamp without time zone '1997-01-02';
-SELECT '' AS "62", d1 FROM TIMESTAMP_TBL
- WHERE d1 != timestamp '1997-01-02' and d1 != timestamp 'current';
+SELECT '' AS "63", d1 FROM TIMESTAMP_TBL
+ WHERE d1 != timestamp without time zone '1997-01-02';
SELECT '' AS "16", d1 FROM TIMESTAMP_TBL
- WHERE d1 <= timestamp '1997-01-02' and d1 != timestamp 'current';
+ WHERE d1 <= timestamp without time zone '1997-01-02';
-SELECT '' AS "48", d1 FROM TIMESTAMP_TBL
- WHERE d1 >= timestamp '1997-01-02' and d1 != timestamp 'current';
-
-SELECT '' AS "66", d1 + interval '1 year' AS one_year FROM TIMESTAMP_TBL;
+SELECT '' AS "49", d1 FROM TIMESTAMP_TBL
+ WHERE d1 >= timestamp without time zone '1997-01-02';
-SELECT '' AS "66", d1 - interval '1 year' AS one_year FROM TIMESTAMP_TBL;
-
-SELECT '' AS "53", d1 - timestamp '1997-01-02' AS diff
+SELECT '' AS "54", d1 - timestamp without time zone '1997-01-02' AS diff
FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
-- Test casting within a BETWEEN qualifier
-SELECT '' AS "53", d1 - timestamp '1997-01-02' AS diff
+SELECT '' AS "54", d1 - timestamp without time zone '1997-01-02' AS diff
FROM TIMESTAMP_TBL
- WHERE d1 BETWEEN timestamp '1902-01-01' AND timestamp '2038-01-01';
+ WHERE d1 BETWEEN timestamp without time zone '1902-01-01'
+ AND timestamp without time zone '2038-01-01';
-SELECT '' AS "53", date_part( 'year', d1) AS year, date_part( 'month', d1) AS month,
+SELECT '' AS "54", 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 TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
-SELECT '' AS "53", date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
+SELECT '' AS "54", date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
date_part( 'usec', d1) AS usec
FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
-- TO_CHAR()
---
SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
FROM TIMESTAMP_TBL;
-
+
SELECT '' AS to_char_2, to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM')
- FROM TIMESTAMP_TBL;
+ FROM TIMESTAMP_TBL;
SELECT '' AS to_char_3, to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J')
FROM TIMESTAMP_TBL;
-
+
SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
- FROM TIMESTAMP_TBL;
-
+ FROM TIMESTAMP_TBL;
+
SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
FROM TIMESTAMP_TBL;
-SELECT '' AS to_char_6, to_char(d1, '"HH:MI:SS is" HH:MI:SS "\\"text bettween quote marks\\""')
- FROM TIMESTAMP_TBL;
-
+SELECT '' AS to_char_6, to_char(d1, '"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
+ FROM TIMESTAMP_TBL;
+
SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
- FROM TIMESTAMP_TBL;
+ FROM TIMESTAMP_TBL;
SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
FROM TIMESTAMP_TBL;
FROM TIMESTAMP_TBL;
-- TO_TIMESTAMP()
---
SELECT '' AS to_timestamp_1, to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
-
+
SELECT '' AS to_timestamp_2, to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
SELECT '' AS to_timestamp_3, to_timestamp('1985 January 12', 'YYYY FMMonth DD');
SELECT '' AS to_timestamp_4, to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
- '"My birthday-> Year" YYYY, "Month:" FMMonth, "Day:" DD');
+ '"My birthday-> Year" YYYY, "Month:" FMMonth, "Day:" DD');
SELECT '' AS to_timestamp_5, to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
-SELECT '' AS to_timestamp_6, to_timestamp('15 "text bettween quote marks" 98 54 45',
- 'HH "\\text bettween quote marks\\"" YY MI SS');
+SELECT '' AS to_timestamp_6, to_timestamp('15 "text between quote marks" 98 54 45',
+ 'HH "\\text between quote marks\\"" YY MI SS');
SELECT '' AS to_timestamp_7, to_timestamp('05121445482000', 'MMDDHHMISSYYYY');
--- /dev/null
+--
+-- TIMESTAMPTZ
+--
+-- needed so tests pass even in Australia
+SET australian_timezones = 'off';
+
+CREATE TABLE TIMESTAMPTZ_TBL ( d1 timestamp with time zone);
+
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('today');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('yesterday');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow EST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow zulu');
+
+SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'today';
+SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'tomorrow';
+SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'yesterday';
+SELECT count(*) AS None FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'now';
+
+DELETE FROM TIMESTAMPTZ_TBL;
+
+-- verify uniform transaction time within transaction block
+BEGIN;
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
+SELECT count(*) AS two FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'now';
+END;
+DELETE FROM TIMESTAMPTZ_TBL;
+
+-- Special values
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('-infinity');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('infinity');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch');
+-- Obsolete special values
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid');
+
+-- Postgres v6.0 standard output format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Invalid Abstime');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Undefined Abstime');
+
+-- Variations on Postgres v6.1 standard output format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.5 1997 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.6 1997 PST');
+
+-- ISO 8601 format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02 03:04:05');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-08');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 -08:00');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20');
+
+-- POSIX format
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT -2');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 EST+3');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 EST +2:00');
+
+-- Variations for acceptable input formats
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 5:32PM 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997/02/10 17:32:01-0800');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb-10-1997 17:32:01 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('02-10-1997 17:32:01 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 PST');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('97FEB10 5:32:01PM UTC');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('97/02/10 17:32:01 UTC');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('97.041 17:32:01 UTC');
+
+-- Check date conversion and date arithmetic
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 18:32:01 PDT');
+
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 11 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 12 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 13 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 14 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 15 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
+
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097 BC');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0597');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1097');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1697');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1797');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1897');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 2097');
+
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1996');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1997');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1999');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2000');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 2000');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2001');
+
+-- Currently unsupported syntax and ranges
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097');
+INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC');
+
+SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL;
+
+-- Demonstrate functions and operators
+SELECT '' AS "48", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 > timestamp with time zone '1997-01-02';
+
+SELECT '' AS "15", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 < timestamp with time zone '1997-01-02';
+
+SELECT '' AS one, d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 = timestamp with time zone '1997-01-02';
+
+SELECT '' AS "63", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 != timestamp with time zone '1997-01-02';
+
+SELECT '' AS "16", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 <= timestamp with time zone '1997-01-02';
+
+SELECT '' AS "49", d1 FROM TIMESTAMPTZ_TBL
+ WHERE d1 >= timestamp with time zone '1997-01-02';
+
+SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
+ FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+
+-- Test casting within a BETWEEN qualifier
+SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
+ FROM TIMESTAMPTZ_TBL
+ WHERE d1 BETWEEN timestamp with time zone '1902-01-01' AND timestamp with time zone '2038-01-01';
+
+SELECT '' AS "54", 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 TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+
+SELECT '' AS "54", date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
+ date_part( 'usec', d1) AS usec
+ FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+
+-- TO_CHAR()
+SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_2, to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_3, to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_6, to_char(d1, '"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
+ FROM TIMESTAMPTZ_TBL;
+
+SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm')
+ FROM TIMESTAMPTZ_TBL;
+
+-- TO_TIMESTAMP()
+SELECT '' AS to_timestamp_1, to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
+
+SELECT '' AS to_timestamp_2, to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
+
+SELECT '' AS to_timestamp_3, to_timestamp('1985 January 12', 'YYYY FMMonth DD');
+
+SELECT '' AS to_timestamp_4, to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
+ '"My birthday-> Year" YYYY, "Month:" FMMonth, "Day:" DD');
+
+SELECT '' AS to_timestamp_5, to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
+
+SELECT '' AS to_timestamp_6, to_timestamp('15 "text between quote marks" 98 54 45',
+ 'HH "\\text between quote marks\\"" YY MI SS');
+
+SELECT '' AS to_timestamp_7, to_timestamp('05121445482000', 'MMDDHHMISSYYYY');
+
+SELECT '' AS to_timestamp_8, to_timestamp('2000January09Sunday', 'YYYYFMMonthDDFMDay');
+
+SELECT '' AS to_timestamp_9, to_timestamp('97/Feb/16', 'YYMonDD');
+
+SELECT '' AS to_timestamp_10, to_timestamp('19971116', 'YYYYMMDD');
+
+SELECT '' AS to_timestamp_11, to_timestamp('20000-1116', 'YYYY-MMDD');
+
+SELECT '' AS to_timestamp_12, to_timestamp('9-1116', 'Y-MMDD');
+
+SELECT '' AS to_timestamp_13, to_timestamp('95-1116', 'YY-MMDD');
+
+SELECT '' AS to_timestamp_14, to_timestamp('995-1116', 'YYY-MMDD');
+
+SET DateStyle TO DEFAULT;
--- /dev/null
+--
+-- TIMETZ
+--
+
+CREATE TABLE TIMETZ_TBL (f1 time with time zone);
+
+INSERT INTO TIMETZ_TBL VALUES ('00:01 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('01:00 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('02:03 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('07:07 PST');
+INSERT INTO TIMETZ_TBL VALUES ('08:08 EDT');
+INSERT INTO TIMETZ_TBL VALUES ('11:59 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('12:00 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('12:01 PDT');
+INSERT INTO TIMETZ_TBL VALUES ('23:59 PDT');
+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 "Seven" FROM TIMETZ_TBL WHERE f1 > '05:06:07';
+
+SELECT f1 AS "None" FROM TIMETZ_TBL WHERE f1 < '00:00';
+
+SELECT f1 AS "Ten" FROM TIMETZ_TBL WHERE f1 >= '00:00';
+
+--
+-- TIME simple math
+--
+-- We now make a distinction between time and intervals,
+-- and adding two times together makes no sense at all.
+-- Leave in one query to show that it is rejected,
+-- and do the rest of the testing in horology.sql
+-- where we do mixed-type arithmetic. - thomas 2000-12-02
+
+SELECT f1 + time with time zone '00:01' AS "Illegal" FROM TIMETZ_TBL;
CREATE TABLE TINTERVAL_TBL (f1 tinterval);
+-- Should accept any abstime,
+-- so do not bother with extensive testing of values
+
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["-infinity" "infinity"]');
VALUES ('["epoch" "Mon May 1 00:30:30 1995"]');
INSERT INTO TINTERVAL_TBL (f1)
- VALUES ('["Feb 15 1990 12:15:03" "current"]');
+ VALUES ('["Feb 15 1990 12:15:03" "2001-09-23 11:12:13"]');
-- badly formatted tintervals
ORDER BY t1.f1;
RESET geqo;
-