hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [06/17] incubator-hawq git commit: HAWQ-1122. Fix ORCA - gpdb exception handling. This closes #793
Date Fri, 28 Oct 2016 03:53:09 GMT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f6b76472/src/test/regress/expected/horology_optimizer.out
----------------------------------------------------------------------
diff --git a/src/test/regress/expected/horology_optimizer.out b/src/test/regress/expected/horology_optimizer.out
new file mode 100755
index 0000000..8b434cd
--- /dev/null
+++ b/src/test/regress/expected/horology_optimizer.out
@@ -0,0 +1,3104 @@
+--
+-- HOROLOGY
+--
+-- create needed tables
+CREATE TABLE ABSTIME_HOROLOGY_TBL (f1 abstime);
+NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'f1' as the Greenplum Database data distribution key for this table.
+HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
+INSERT INTO ABSTIME_HOROLOGY_TBL (f1) VALUES ('Jan 14, 1973 03:14:21'),
+(abstime 'Mon May  1 00:30:30 1995'),
+(abstime 'epoch'),
+(abstime 'infinity'),
+(abstime '-infinity'),
+(abstime 'May 10, 1947 23:59:12');
+-- orca will fail for this
+INSERT INTO ABSTIME_HOROLOGY_TBL (f1) VALUES('Jun 10, 1843');
+ERROR:  cannot convert abstime "invalid" to timestamp
+ERROR:  GPDB exception. Aborting GPORCA plan generation. (CGPOptimizer.cpp:66)
+CREATE TABLE INTERVAL_HOROLOGY_TBL (f1 interval);
+NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'f1' as the Greenplum Database data distribution key for this table.
+HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
+INSERT INTO INTERVAL_HOROLOGY_TBL (f1) VALUES ('@ 1 minute'),
+('@ 5 hour'),
+('@ 10 day'),
+('@ 34 year'),
+('@ 3 months'),
+('@ 14 seconds ago'),
+('1 day 2 hours 3 minutes 4 seconds'),
+('6 years'),
+('5 months'),
+('5 months 12 hours');
+CREATE TABLE RELTIME_HOROLOGY_TBL (f1 reltime);
+NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'f1' as the Greenplum Database data distribution key for this table.
+HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
+INSERT INTO RELTIME_HOROLOGY_TBL (f1) VALUES ('@ 1 minute'),
+('@ 5 hour'),
+('@ 10 day'),
+('@ 34 year'),
+('@ 3 months'),
+('@ 14 seconds ago');
+CREATE TABLE TIME_HOROLOGY_TBL (f1 time(2));
+NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'f1' as the Greenplum Database data distribution key for this table.
+HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
+INSERT INTO TIME_HOROLOGY_TBL VALUES ('00:00'),
+('01:00'),
+('02:03 PST'),
+('11:59 EDT'),
+('12:00'),
+('12:01'),
+('23:59'),
+('11:59:59.99 PM'),
+('2003-03-07 15:36:39 America/New_York'),
+('2003-07-07 15:36:39 America/New_York');
+CREATE TABLE TIMETZ_HOROLOGY_TBL (f1 time(2) with time zone);
+NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'f1' as the Greenplum Database data distribution key for this table.
+HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
+INSERT INTO TIMETZ_HOROLOGY_TBL VALUES ('00:01 PDT'),
+('01:00 PDT'),
+('02:03 PDT'),
+('07:07 PST'),
+('08:08 EDT'),
+('11:59 PDT'),
+('12:00 PDT'),
+('12:01 PDT'),
+('23:59 PDT'),
+('11:59:59.99 PM PDT'),
+('2003-03-07 15:36:39 America/New_York'),
+('2003-07-07 15:36:39 America/New_York');
+CREATE TABLE TIMESTAMP_HOROLOGY_TBL (d1 timestamp(2) without time zone);
+NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'd1' as the Greenplum Database data distribution key for this table.
+HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
+INSERT INTO TIMESTAMP_HOROLOGY_TBL VALUES ('-infinity'),
+('infinity'),
+('epoch'),
+('Mon Feb 10 17:32:01 1997 PST'),
+('Mon Feb 10 17:32:01.000001 1997 PST'),
+('Mon Feb 10 17:32:01.999999 1997 PST'),
+('Mon Feb 10 17:32:01.4 1997 PST'),
+('Mon Feb 10 17:32:01.5 1997 PST'),
+('Mon Feb 10 17:32:01.6 1997 PST'),
+('1997-01-02'),
+('1997-01-02 03:04:05'),
+('1997-02-10 17:32:01-08'),
+('1997-02-10 17:32:01-0800'),
+('1997-02-10 17:32:01 -08:00'),
+('19970210 173201 -0800'),
+('1997-06-10 17:32:01 -07:00'),
+('2001-09-22T18:19:20'),
+('2000-03-15 08:14:01 GMT+8'),
+('2000-03-15 13:14:02 GMT-1'),
+('2000-03-15 12:14:03 GMT-2'),
+('2000-03-15 03:14:04 PST+8'),
+('2000-03-15 02:14:05 MST+7:00'),
+('Feb 10 17:32:01 1997 -0800'),
+('Feb 10 17:32:01 1997'),
+('Feb 10 5:32PM 1997'),
+('1997/02/10 17:32:01-0800'),
+('1997-02-10 17:32:01 PST'),
+('Feb-10-1997 17:32:01 PST'),
+('02-10-1997 17:32:01 PST'),
+('19970210 173201 PST'),
+('1997.041 17:32:01 UTC'),
+('19970210 173201 America/New_York'),
+('1997-06-10 18:32:01 PDT'),
+('Feb 10 17:32:01 1997'),
+('Feb 11 17:32:01 1997'),
+('Feb 12 17:32:01 1997'),
+('Feb 13 17:32:01 1997'),
+('Feb 14 17:32:01 1997'),
+('Feb 15 17:32:01 1997'),
+('Feb 16 17:32:01 1997'),
+('Feb 16 17:32:01 0097 BC'),
+('Feb 16 17:32:01 0097'),
+('Feb 16 17:32:01 0597'),
+('Feb 16 17:32:01 1097'),
+('Feb 16 17:32:01 1697'),
+('Feb 16 17:32:01 1797'),
+('Feb 16 17:32:01 1897'),
+('Feb 16 17:32:01 1997'),
+('Feb 16 17:32:01 2097'),
+('Feb 28 17:32:01 1996'),
+('Feb 29 17:32:01 1996'),
+('Mar 01 17:32:01 1996'),
+('Dec 30 17:32:01 1996'),
+('Dec 31 17:32:01 1996'),
+('Jan 01 17:32:01 1997'),
+('Feb 28 17:32:01 1997'),
+('Mar 01 17:32:01 1997'),
+('Dec 30 17:32:01 1997'),
+('Dec 31 17:32:01 1997'),
+('Dec 31 17:32:01 1999'),
+('Jan 01 17:32:01 2000'),
+('Dec 31 17:32:01 2000'),
+('Jan 01 17:32:01 2001');
+set datestyle to ymd;
+INSERT INTO TIMESTAMP_HOROLOGY_TBL VALUES ('97FEB10 5:32:01PM UTC'),
+('97/02/10 17:32:01 UTC');
+reset datestyle;
+CREATE TABLE TIMESTAMPTZ_HOROLOGY_TBL (d1 timestamp(2) with time zone);
+NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'd1' as the Greenplum Database data distribution key for this table.
+HINT:  The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
+INSERT INTO TIMESTAMPTZ_HOROLOGY_TBL VALUES ('-infinity'),
+('infinity'),
+('epoch'),
+('Mon Feb 10 17:32:01 1997 PST'),
+('Mon Feb 10 17:32:01.000001 1997 PST'),
+('Mon Feb 10 17:32:01.999999 1997 PST'),
+('Mon Feb 10 17:32:01.4 1997 PST'),
+('Mon Feb 10 17:32:01.5 1997 PST'),
+('Mon Feb 10 17:32:01.6 1997 PST'),
+('1997-01-02'),
+('1997-01-02 03:04:05'),
+('1997-02-10 17:32:01-08'),
+('1997-02-10 17:32:01-0800'),
+('1997-02-10 17:32:01 -08:00'),
+('19970210 173201 -0800'),
+('1997-06-10 17:32:01 -07:00'),
+('2001-09-22T18:19:20'),
+('2000-03-15 08:14:01 GMT+8'),
+('2000-03-15 13:14:02 GMT-1'),
+('2000-03-15 12:14:03 GMT-2'),
+('2000-03-15 03:14:04 PST+8'),
+('2000-03-15 02:14:05 MST+7:00'),
+('Feb 10 17:32:01 1997 -0800'),
+('Feb 10 17:32:01 1997'),
+('Feb 10 5:32PM 1997'),
+('1997/02/10 17:32:01-0800'),
+('1997-02-10 17:32:01 PST'),
+('Feb-10-1997 17:32:01 PST'),
+('02-10-1997 17:32:01 PST'),
+('19970210 173201 PST'),
+('1997.041 17:32:01 UTC'),
+('19970210 173201 America/New_York'),
+('19970710 173201 America/New_York'),
+('1997-06-10 18:32:01 PDT'),
+('Feb 10 17:32:01 1997'),
+('Feb 11 17:32:01 1997'),
+('Feb 12 17:32:01 1997'),
+('Feb 13 17:32:01 1997'),
+('Feb 14 17:32:01 1997'),
+('Feb 15 17:32:01 1997'),
+('Feb 16 17:32:01 1997'),
+('Feb 16 17:32:01 0097 BC'),
+('Feb 16 17:32:01 0097'),
+('Feb 16 17:32:01 0597'),
+('Feb 16 17:32:01 1097'),
+('Feb 16 17:32:01 1697'),
+('Feb 16 17:32:01 1797'),
+('Feb 16 17:32:01 1897'),
+('Feb 16 17:32:01 1997'),
+('Feb 16 17:32:01 2097'),
+('Feb 28 17:32:01 1996'),
+('Feb 29 17:32:01 1996'),
+('Mar 01 17:32:01 1996'),
+('Dec 30 17:32:01 1996'),
+('Dec 31 17:32:01 1996'),
+('Jan 01 17:32:01 1997'),
+('Feb 28 17:32:01 1997'),
+('Mar 01 17:32:01 1997'),
+('Dec 30 17:32:01 1997'),
+('Dec 31 17:32:01 1997'),
+('Dec 31 17:32:01 1999'),
+('Jan 01 17:32:01 2000'),
+('Dec 31 17:32:01 2000'),
+('Jan 01 17:32:01 2001');
+set datestyle to ymd;
+INSERT INTO TIMESTAMPTZ_HOROLOGY_TBL VALUES ('97FEB10 5:32:01PM UTC'),
+('97/02/10 17:32:01 UTC');
+reset datestyle;
+--
+--
+--
+SET DateStyle = 'Postgres, MDY';
+--
+-- Test various input formats
+--
+SELECT timestamp with time zone '20011227 040506+08';
+         timestamptz          
+------------------------------
+ Wed Dec 26 12:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '20011227 040506-08';
+         timestamptz          
+------------------------------
+ Thu Dec 27 04:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '20011227 040506.789+08';
+           timestamptz            
+----------------------------------
+ Wed Dec 26 12:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '20011227 040506.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '20011227T040506+08';
+         timestamptz          
+------------------------------
+ Wed Dec 26 12:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '20011227T040506-08';
+         timestamptz          
+------------------------------
+ Thu Dec 27 04:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '20011227T040506.789+08';
+           timestamptz            
+----------------------------------
+ Wed Dec 26 12:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '20011227T040506.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '2001-12-27 04:05:06.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '2001.12.27 04:05:06.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '2001/12/27 04:05:06.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '12/27/2001 04:05:06.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+-- should fail in mdy mode:
+SELECT timestamp with time zone '27/12/2001 04:05:06.789-08';
+ERROR:  date/time field value out of range: "27/12/2001 04:05:06.789-08"
+LINE 1: SELECT timestamp with time zone '27/12/2001 04:05:06.789-08'...
+                                        ^
+HINT:  Perhaps you need a different "datestyle" setting.
+set datestyle to dmy;
+SELECT timestamp with time zone '27/12/2001 04:05:06.789-08';
+           timestamptz            
+----------------------------------
+ Thu 27 Dec 04:05:06.789 2001 PST
+(1 row)
+
+reset datestyle;
+SELECT timestamp with time zone 'Y2001M12D27H04M05S06.789+08';
+           timestamptz            
+----------------------------------
+ Wed Dec 26 12:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'Y2001M12D27H04M05S06.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'Y2001M12D27H04MM05S06.789+08';
+           timestamptz            
+----------------------------------
+ Wed Dec 26 12:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'Y2001M12D27H04MM05S06.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271+08';
+         timestamptz          
+------------------------------
+ Wed Dec 26 08:00:00 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271-08';
+         timestamptz          
+------------------------------
+ Thu Dec 27 00:00:00 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271.5+08';
+         timestamptz          
+------------------------------
+ Wed Dec 26 20:00:00 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271.5-08';
+         timestamptz          
+------------------------------
+ Thu Dec 27 12:00:00 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271 04:05:06+08';
+         timestamptz          
+------------------------------
+ Wed Dec 26 12:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271 04:05:06-08';
+         timestamptz          
+------------------------------
+ Thu Dec 27 04:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271T040506+08';
+         timestamptz          
+------------------------------
+ Wed Dec 26 12:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271T040506-08';
+         timestamptz          
+------------------------------
+ Thu Dec 27 04:05:06 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271T040506.789+08';
+           timestamptz            
+----------------------------------
+ Wed Dec 26 12:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone 'J2452271T040506.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+-- German/European-style dates with periods as delimiters
+SELECT timestamp with time zone '12.27.2001 04:05:06.789+08';
+           timestamptz            
+----------------------------------
+ Wed Dec 26 12:05:06.789 2001 PST
+(1 row)
+
+SELECT timestamp with time zone '12.27.2001 04:05:06.789-08';
+           timestamptz            
+----------------------------------
+ Thu Dec 27 04:05:06.789 2001 PST
+(1 row)
+
+SET DateStyle = 'German';
+SELECT timestamp with time zone '27.12.2001 04:05:06.789+08';
+         timestamptz         
+-----------------------------
+ 26.12.2001 12:05:06.789 PST
+(1 row)
+
+SELECT timestamp with time zone '27.12.2001 04:05:06.789-08';
+         timestamptz         
+-----------------------------
+ 27.12.2001 04:05:06.789 PST
+(1 row)
+
+SET DateStyle = 'ISO';
+-- As of 7.4, allow time without time zone having a time zone specified
+SELECT time without time zone '040506.789+08';
+     time     
+--------------
+ 04:05:06.789
+(1 row)
+
+SELECT time without time zone '040506.789-08';
+     time     
+--------------
+ 04:05:06.789
+(1 row)
+
+SELECT time without time zone 'T040506.789+08';
+     time     
+--------------
+ 04:05:06.789
+(1 row)
+
+SELECT time without time zone 'T040506.789-08';
+     time     
+--------------
+ 04:05:06.789
+(1 row)
+
+SELECT time with time zone '040506.789+08';
+     timetz      
+-----------------
+ 04:05:06.789+08
+(1 row)
+
+SELECT time with time zone '040506.789-08';
+     timetz      
+-----------------
+ 04:05:06.789-08
+(1 row)
+
+SELECT time with time zone 'T040506.789+08';
+     timetz      
+-----------------
+ 04:05:06.789+08
+(1 row)
+
+SELECT time with time zone 'T040506.789-08';
+     timetz      
+-----------------
+ 04:05:06.789-08
+(1 row)
+
+SELECT time with time zone 'T040506.789 +08';
+     timetz      
+-----------------
+ 04:05:06.789+08
+(1 row)
+
+SELECT time with time zone 'T040506.789 -08';
+     timetz      
+-----------------
+ 04:05:06.789-08
+(1 row)
+
+SET DateStyle = 'Postgres, MDY';
+--
+-- date, time arithmetic
+--
+SELECT date '1981-02-03' + time '04:05:06' AS "Date + Time";
+       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";
+       Date + Time PST        
+------------------------------
+ Sun Feb 03 04:05:06 1991 PST
+(1 row)
+
+SELECT date '2001-02-03' + time with time zone '04:05:06 UTC' AS "Date + Time UTC";
+       Date + Time UTC        
+------------------------------
+ Fri Feb 02 20:05:06 2001 PST
+(1 row)
+
+SELECT date '1991-02-03' + interval '2 years' AS "Add Two Years";
+      Add Two Years       
+--------------------------
+ Wed Feb 03 00:00:00 1993
+(1 row)
+
+SELECT date '2001-12-13' - interval '2 years' AS "Subtract Two Years";
+    Subtract Two Years    
+--------------------------
+ Mon Dec 13 00:00:00 1999
+(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       
+--------------------------
+ Sat Feb 02 19:54:54 1991
+(1 row)
+
+SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time UTC";
+ERROR:  operator does not exist: date - time with time zone
+LINE 1: SELECT date '1991-02-03' - time with time zone '04:05:06 UTC...
+                                 ^
+HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
+--
+-- timestamp, interval arithmetic
+--
+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)
+
+SELECT timestamp without time zone 'Jan 1, 4713 BC' + interval '106000000 days' AS "Feb 23, 285506";
+       Feb 23, 285506       
+----------------------------
+ Fri Feb 23 00:00:00 285506
+(1 row)
+
+SELECT timestamp without time zone 'Jan 1, 4713 BC' + interval '107000000 days' AS "Jan 20, 288244";
+       Jan 20, 288244       
+----------------------------
+ Sat Jan 20 00:00:00 288244
+(1 row)
+
+SELECT timestamp without time zone 'Jan 1, 4713 BC' + interval '109203489 days' AS "Dec 31, 294276";
+       Dec 31, 294276       
+----------------------------
+ Sun Dec 31 00:00:00 294276
+(1 row)
+
+SELECT timestamp without time zone '12/31/294276' - timestamp without time zone '12/23/1999' AS "106751991 Days";
+  106751991 Days  
+------------------
+ @ 106751991 days
+(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)
+
+-- Convert from date and time to timestamp
+-- This test used to be timestamp(date,time) but no longer allowed by grammar
+-- to enable support for SQL99 timestamp type syntax.
+SELECT 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 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 date '1994-01-01' + timetz '11:00-5' AS "Jan_01_1994_8am";
+       Jan_01_1994_8am        
+------------------------------
+ Sat Jan 01 08: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 TIMESTAMP_HOROLOGY_TBL ORDER BY 2;
+ 64 |          one_year           
+----+-----------------------------
+    | -infinity
+    | Thu Feb 16 17:32:01 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
+    | Fri Jan 01 00:00:00 1971
+    | 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
+    | Fri Jan 02 00:00:00 1998
+    | Fri Jan 02 03:04:05 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
+    | 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
+    | Tue Feb 10 17:32:01 1998
+    | Tue Feb 10 17:32:01 1998
+    | Tue Feb 10 17:32:01.4 1998
+    | Tue Feb 10 17:32:01.5 1998
+    | Tue Feb 10 17:32:01.6 1998
+    | Tue Feb 10 17:32:02 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
+    | Mon Feb 16 17:32:01 1998
+    | Sat Feb 28 17:32:01 1998
+    | Sun Mar 01 17:32:01 1998
+    | Wed Jun 10 17:32:01 1998
+    | Wed Jun 10 18: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
+    | Thu Mar 15 02:14:05 2001
+    | Thu Mar 15 03:14:04 2001
+    | Thu Mar 15 08:14:01 2001
+    | Thu Mar 15 12:14:03 2001
+    | Thu Mar 15 13:14:02 2001
+    | Mon Dec 31 17:32:01 2001
+    | Tue Jan 01 17:32:01 2002
+    | Sun Sep 22 18:19:20 2002
+    | Sun Feb 16 17:32:01 2098
+    | infinity
+(65 rows)
+
+SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMP_HOROLOGY_TBL ORDER BY 2;
+ 64 |          one_year           
+----+-----------------------------
+    | -infinity
+    | Mon Feb 16 17:32:01 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
+    | Wed Jan 01 00:00:00 1969
+    | 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
+    | Tue Jan 02 00:00:00 1996
+    | Tue Jan 02 03:04:05 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
+    | 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
+    | Sat Feb 10 17:32:01 1996
+    | Sat Feb 10 17:32:01 1996
+    | Sat Feb 10 17:32:01.4 1996
+    | Sat Feb 10 17:32:01.5 1996
+    | Sat Feb 10 17:32:01.6 1996
+    | Sat Feb 10 17:32:02 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
+    | Fri Feb 16 17:32:01 1996
+    | Wed Feb 28 17:32:01 1996
+    | Fri Mar 01 17:32:01 1996
+    | Mon Jun 10 17:32:01 1996
+    | Mon Jun 10 18: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
+    | Mon Mar 15 02:14:05 1999
+    | Mon Mar 15 03:14:04 1999
+    | Mon Mar 15 08:14:01 1999
+    | Mon Mar 15 12:14:03 1999
+    | Mon Mar 15 13:14:02 1999
+    | Fri Dec 31 17:32:01 1999
+    | Sat Jan 01 17:32:01 2000
+    | Fri Sep 22 18:19:20 2000
+    | Thu Feb 16 17:32:01 2096
+    | infinity
+(65 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 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 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 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)
+
+-- timestamp with time zone, interval arithmetic around DST change
+SET TIME ZONE 'CST7CDT';
+SELECT timestamp with time zone '2005-04-02 12:00-07' + interval '1 day' as "Apr 3, 12:00";
+         Apr 3, 12:00         
+------------------------------
+ Sun Apr 03 12:00:00 2005 CDT
+(1 row)
+
+SELECT timestamp with time zone '2005-04-02 12:00-07' + interval '24 hours' as "Apr 3, 13:00";
+         Apr 3, 13:00         
+------------------------------
+ Sun Apr 03 13:00:00 2005 CDT
+(1 row)
+
+SELECT timestamp with time zone '2005-04-03 12:00-06' - interval '1 day' as "Apr 2, 12:00";
+         Apr 2, 12:00         
+------------------------------
+ Sat Apr 02 12:00:00 2005 CST
+(1 row)
+
+SELECT timestamp with time zone '2005-04-03 12:00-06' - interval '24 hours' as "Apr 2, 11:00";
+         Apr 2, 11:00         
+------------------------------
+ Sat Apr 02 11:00:00 2005 CST
+(1 row)
+
+RESET TIME ZONE;
+SET TIME ZONE 'PST8PDT';
+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_HOROLOGY_TBL ORDER BY 2;
+ 64 |            one_year             
+----+---------------------------------
+    | -infinity
+    | Thu Feb 16 17:32:01 0096 PST BC
+    | Sun Feb 16 17:32:01 0098 PST
+    | Fri Feb 16 17:32:01 0598 PST
+    | Wed Feb 16 17:32:01 1098 PST
+    | Sun Feb 16 17:32:01 1698 PST
+    | Fri Feb 16 17:32:01 1798 PST
+    | Wed Feb 16 17:32:01 1898 PST
+    | Thu Dec 31 16:00:00 1970 PST
+    | 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
+    | Fri Jan 02 00:00:00 1998 PST
+    | Fri Jan 02 03:04:05 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
+    | Tue Feb 10 14: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 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 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.4 1998 PST
+    | Tue Feb 10 17:32:01.5 1998 PST
+    | Tue Feb 10 17:32:01.6 1998 PST
+    | Tue Feb 10 17:32:02 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
+    | Mon Feb 16 17:32:01 1998 PST
+    | Sat Feb 28 17:32:01 1998 PST
+    | Sun Mar 01 17:32:01 1998 PST
+    | Wed Jun 10 17:32:01 1998 PDT
+    | Wed Jun 10 18:32:01 1998 PDT
+    | Fri Jul 10 14:32:01 1998 PDT
+    | 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
+    | Thu Mar 15 01:14:05 2001 PST
+    | Thu Mar 15 02:14:03 2001 PST
+    | Thu Mar 15 03:14:04 2001 PST
+    | Thu Mar 15 04:14:02 2001 PST
+    | Thu Mar 15 08:14:01 2001 PST
+    | Mon Dec 31 17:32:01 2001 PST
+    | Tue Jan 01 17:32:01 2002 PST
+    | Sun Sep 22 18:19:20 2002 PDT
+    | Sun Feb 16 17:32:01 2098 PST
+    | infinity
+(66 rows)
+
+SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_HOROLOGY_TBL ORDER BY 2;
+ 64 |            one_year             
+----+---------------------------------
+    | -infinity
+    | Mon Feb 16 17:32:01 0098 PST BC
+    | Thu Feb 16 17:32:01 0096 PST
+    | Tue Feb 16 17:32:01 0596 PST
+    | Sun Feb 16 17:32:01 1096 PST
+    | Thu Feb 16 17:32:01 1696 PST
+    | Tue Feb 16 17:32:01 1796 PST
+    | Sun Feb 16 17:32:01 1896 PST
+    | Tue Dec 31 16:00:00 1968 PST
+    | 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
+    | Tue Jan 02 00:00:00 1996 PST
+    | Tue Jan 02 03:04:05 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
+    | Sat Feb 10 14: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 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 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.4 1996 PST
+    | Sat Feb 10 17:32:01.5 1996 PST
+    | Sat Feb 10 17:32:01.6 1996 PST
+    | Sat Feb 10 17:32:02 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
+    | Fri Feb 16 17:32:01 1996 PST
+    | Wed Feb 28 17:32:01 1996 PST
+    | Fri Mar 01 17:32:01 1996 PST
+    | Mon Jun 10 17:32:01 1996 PDT
+    | Mon Jun 10 18:32:01 1996 PDT
+    | Wed Jul 10 14:32:01 1996 PDT
+    | 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
+    | Mon Mar 15 01:14:05 1999 PST
+    | Mon Mar 15 02:14:03 1999 PST
+    | Mon Mar 15 03:14:04 1999 PST
+    | Mon Mar 15 04:14:02 1999 PST
+    | Mon Mar 15 08:14:01 1999 PST
+    | Fri Dec 31 17:32:01 1999 PST
+    | Sat Jan 01 17:32:01 2000 PST
+    | Fri Sep 22 18:19:20 2000 PDT
+    | Thu Feb 16 17:32:01 2096 PST
+    | infinity
+(66 rows)
+
+--
+-- time, interval arithmetic
+--
+SELECT CAST(time '01:02' AS interval) AS "+01:02";
+     +01:02      
+-----------------
+ @ 1 hour 2 mins
+(1 row)
+
+SELECT CAST(interval '02:03' AS time) AS "02:03:00";
+ 02:03:00 
+----------
+ 02:03:00
+(1 row)
+
+SELECT time '01:30' + interval '02:01' AS "03:31:00";
+ 03:31:00 
+----------
+ 03:31:00
+(1 row)
+
+SELECT time '01:30' - interval '02:01' AS "23:29:00";
+ 23:29:00 
+----------
+ 23:29:00
+(1 row)
+
+SELECT time '02:30' + interval '36:01' AS "14:31:00";
+ 14:31:00 
+----------
+ 14:31:00
+(1 row)
+
+SELECT time '03:30' + interval '1 month 04:01' AS "07:31:00";
+ 07:31:00 
+----------
+ 07:31:00
+(1 row)
+
+SELECT CAST(time with time zone '01:02-08' AS interval) AS "+00:01";
+ERROR:  cannot cast type time with time zone to interval
+LINE 1: SELECT CAST(time with time zone '01:02-08' AS interval) AS "...
+                                                      ^
+SELECT CAST(interval '02:03' AS time with time zone) AS "02:03:00-08";
+ERROR:  cannot cast type interval to time with time zone
+LINE 1: SELECT CAST(interval '02:03' AS time with time zone) AS "02:...
+                                        ^
+SELECT time with time zone '01:30-08' - interval '02:01' AS "23:29:00-08";
+ 23:29:00-08 
+-------------
+ 23:29:00-08
+(1 row)
+
+SELECT time with time zone '02:30-08' + interval '36:01' AS "14:31:00-08";
+ 14:31:00-08 
+-------------
+ 14:31:00-08
+(1 row)
+
+-- These two tests cannot be used because they default to current timezone,
+-- which may be either -08 or -07 depending on the time of year.
+-- 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(CAST(date 'today' + time with time zone '05:30'
+            + interval '02:01' AS time with time zone) AS time) AS "07:31:00";
+ 07:31:00 
+----------
+ 07:31:00
+(1 row)
+
+SELECT CAST(cast(date 'today' + time with time zone '03:30'
+  + interval '1 month 04:01' as timestamp without time zone) AS time) AS "07:31:00";
+ 07:31:00 
+----------
+ 07:31:00
+(1 row)
+
+SELECT t.d1 AS t, i.f1 AS i, t.d1 + i.f1 AS "add", t.d1 - i.f1 AS "subtract"
+  FROM TIMESTAMP_HOROLOGY_TBL t, INTERVAL_HOROLOGY_TBL i
+  WHERE t.d1 BETWEEN '1990-01-01' AND '2001-01-01'
+    AND i.f1 BETWEEN '00:00' AND '23:00'
+  ORDER BY 1,2;
+              t             |     i     |             add            |          subtract           
+----------------------------+-----------+----------------------------+----------------------------
+ Wed Feb 28 17:32:01 1996   | @ 1 min   | Wed Feb 28 17:33:01 1996   | Wed Feb 28 17:31:01 1996
+ Wed Feb 28 17:32:01 1996   | @ 5 hours | Wed Feb 28 22:32:01 1996   | Wed Feb 28 12:32:01 1996
+ Thu Feb 29 17:32:01 1996   | @ 1 min   | Thu Feb 29 17:33:01 1996   | Thu Feb 29 17:31:01 1996
+ Thu Feb 29 17:32:01 1996   | @ 5 hours | Thu Feb 29 22:32:01 1996   | Thu Feb 29 12:32:01 1996
+ Fri Mar 01 17:32:01 1996   | @ 1 min   | Fri Mar 01 17:33:01 1996   | Fri Mar 01 17:31:01 1996
+ Fri Mar 01 17:32:01 1996   | @ 5 hours | Fri Mar 01 22:32:01 1996   | Fri Mar 01 12:32:01 1996
+ Mon Dec 30 17:32:01 1996   | @ 1 min   | Mon Dec 30 17:33:01 1996   | Mon Dec 30 17:31:01 1996
+ Mon Dec 30 17:32:01 1996   | @ 5 hours | Mon Dec 30 22:32:01 1996   | Mon Dec 30 12:32:01 1996
+ Tue Dec 31 17:32:01 1996   | @ 1 min   | Tue Dec 31 17:33:01 1996   | Tue Dec 31 17:31:01 1996
+ Tue Dec 31 17:32:01 1996   | @ 5 hours | Tue Dec 31 22:32:01 1996   | Tue Dec 31 12:32:01 1996
+ Wed Jan 01 17:32:01 1997   | @ 1 min   | Wed Jan 01 17:33:01 1997   | Wed Jan 01 17:31:01 1997
+ Wed Jan 01 17:32:01 1997   | @ 5 hours | Wed Jan 01 22:32:01 1997   | Wed Jan 01 12:32:01 1997
+ Thu Jan 02 00:00:00 1997   | @ 1 min   | Thu Jan 02 00:01:00 1997   | Wed Jan 01 23:59:00 1997
+ Thu Jan 02 00:00:00 1997   | @ 5 hours | Thu Jan 02 05:00:00 1997   | Wed Jan 01 19:00:00 1997
+ Thu Jan 02 03:04:05 1997   | @ 1 min   | Thu Jan 02 03:05:05 1997   | Thu Jan 02 03:03:05 1997
+ Thu Jan 02 03:04:05 1997   | @ 5 hours | Thu Jan 02 08:04:05 1997   | Wed Jan 01 22:04:05 1997
+ Mon Feb 10 17:32:00 1997   | @ 1 min   | Mon Feb 10 17:33:00 1997   | Mon Feb 10 17:31:00 1997
+ Mon Feb 10 17:32:00 1997   | @ 5 hours | Mon Feb 10 22:32:00 1997   | Mon Feb 10 12:32:00 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 1 min   | Mon Feb 10 17:33:01 1997   | Mon Feb 10 17:31:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01 1997   | @ 5 hours | Mon Feb 10 22:32:01 1997   | Mon Feb 10 12:32:01 1997
+ Mon Feb 10 17:32:01.4 1997 | @ 1 min   | Mon Feb 10 17:33:01.4 1997 | Mon Feb 10 17:31:01.4 1997
+ Mon Feb 10 17:32:01.4 1997 | @ 5 hours | Mon Feb 10 22:32:01.4 1997 | Mon Feb 10 12:32:01.4 1997
+ Mon Feb 10 17:32:01.5 1997 | @ 1 min   | Mon Feb 10 17:33:01.5 1997 | Mon Feb 10 17:31:01.5 1997
+ Mon Feb 10 17:32:01.5 1997 | @ 5 hours | Mon Feb 10 22:32:01.5 1997 | Mon Feb 10 12:32:01.5 1997
+ Mon Feb 10 17:32:01.6 1997 | @ 1 min   | Mon Feb 10 17:33:01.6 1997 | Mon Feb 10 17:31:01.6 1997
+ Mon Feb 10 17:32:01.6 1997 | @ 5 hours | Mon Feb 10 22:32:01.6 1997 | Mon Feb 10 12:32:01.6 1997
+ Mon Feb 10 17:32:02 1997   | @ 1 min   | Mon Feb 10 17:33:02 1997   | Mon Feb 10 17:31:02 1997
+ Mon Feb 10 17:32:02 1997   | @ 5 hours | Mon Feb 10 22:32:02 1997   | Mon Feb 10 12:32:02 1997
+ Tue Feb 11 17:32:01 1997   | @ 1 min   | Tue Feb 11 17:33:01 1997   | Tue Feb 11 17:31:01 1997
+ Tue Feb 11 17:32:01 1997   | @ 5 hours | Tue Feb 11 22:32:01 1997   | Tue Feb 11 12:32:01 1997
+ Wed Feb 12 17:32:01 1997   | @ 1 min   | Wed Feb 12 17:33:01 1997   | Wed Feb 12 17:31:01 1997
+ Wed Feb 12 17:32:01 1997   | @ 5 hours | Wed Feb 12 22:32:01 1997   | Wed Feb 12 12:32:01 1997
+ Thu Feb 13 17:32:01 1997   | @ 1 min   | Thu Feb 13 17:33:01 1997   | Thu Feb 13 17:31:01 1997
+ Thu Feb 13 17:32:01 1997   | @ 5 hours | Thu Feb 13 22:32:01 1997   | Thu Feb 13 12:32:01 1997
+ Fri Feb 14 17:32:01 1997   | @ 1 min   | Fri Feb 14 17:33:01 1997   | Fri Feb 14 17:31:01 1997
+ Fri Feb 14 17:32:01 1997   | @ 5 hours | Fri Feb 14 22:32:01 1997   | Fri Feb 14 12:32:01 1997
+ Sat Feb 15 17:32:01 1997   | @ 1 min   | Sat Feb 15 17:33:01 1997   | Sat Feb 15 17:31:01 1997
+ Sat Feb 15 17:32:01 1997   | @ 5 hours | Sat Feb 15 22:32:01 1997   | Sat Feb 15 12:32:01 1997
+ Sun Feb 16 17:32:01 1997   | @ 1 min   | Sun Feb 16 17:33:01 1997   | Sun Feb 16 17:31:01 1997
+ Sun Feb 16 17:32:01 1997   | @ 1 min   | Sun Feb 16 17:33:01 1997   | Sun Feb 16 17:31:01 1997
+ Sun Feb 16 17:32:01 1997   | @ 5 hours | Sun Feb 16 22:32:01 1997   | Sun Feb 16 12:32:01 1997
+ Sun Feb 16 17:32:01 1997   | @ 5 hours | Sun Feb 16 22:32:01 1997   | Sun Feb 16 12:32:01 1997
+ Fri Feb 28 17:32:01 1997   | @ 1 min   | Fri Feb 28 17:33:01 1997   | Fri Feb 28 17:31:01 1997
+ Fri Feb 28 17:32:01 1997   | @ 5 hours | Fri Feb 28 22:32:01 1997   | Fri Feb 28 12:32:01 1997
+ Sat Mar 01 17:32:01 1997   | @ 1 min   | Sat Mar 01 17:33:01 1997   | Sat Mar 01 17:31:01 1997
+ Sat Mar 01 17:32:01 1997   | @ 5 hours | Sat Mar 01 22:32:01 1997   | Sat Mar 01 12:32:01 1997
+ Tue Jun 10 17:32:01 1997   | @ 1 min   | Tue Jun 10 17:33:01 1997   | Tue Jun 10 17:31:01 1997
+ Tue Jun 10 17:32:01 1997   | @ 5 hours | Tue Jun 10 22:32:01 1997   | Tue Jun 10 12:32:01 1997
+ Tue Jun 10 18:32:01 1997   | @ 1 min   | Tue Jun 10 18:33:01 1997   | Tue Jun 10 18:31:01 1997
+ Tue Jun 10 18:32:01 1997   | @ 5 hours | Tue Jun 10 23:32:01 1997   | Tue Jun 10 13:32:01 1997
+ Tue Dec 30 17:32:01 1997   | @ 1 min   | Tue Dec 30 17:33:01 1997   | Tue Dec 30 17:31:01 1997
+ Tue Dec 30 17:32:01 1997   | @ 5 hours | Tue Dec 30 22:32:01 1997   | Tue Dec 30 12:32:01 1997
+ Wed Dec 31 17:32:01 1997   | @ 1 min   | Wed Dec 31 17:33:01 1997   | Wed Dec 31 17:31:01 1997
+ Wed Dec 31 17:32:01 1997   | @ 5 hours | Wed Dec 31 22:32:01 1997   | Wed Dec 31 12:32:01 1997
+ Fri Dec 31 17:32:01 1999   | @ 1 min   | Fri Dec 31 17:33:01 1999   | Fri Dec 31 17:31:01 1999
+ Fri Dec 31 17:32:01 1999   | @ 5 hours | Fri Dec 31 22:32:01 1999   | Fri Dec 31 12:32:01 1999
+ Sat Jan 01 17:32:01 2000   | @ 1 min   | Sat Jan 01 17:33:01 2000   | Sat Jan 01 17:31:01 2000
+ Sat Jan 01 17:32:01 2000   | @ 5 hours | Sat Jan 01 22:32:01 2000   | Sat Jan 01 12:32:01 2000
+ Wed Mar 15 02:14:05 2000   | @ 1 min   | Wed Mar 15 02:15:05 2000   | Wed Mar 15 02:13:05 2000
+ Wed Mar 15 02:14:05 2000   | @ 5 hours | Wed Mar 15 07:14:05 2000   | Tue Mar 14 21:14:05 2000
+ Wed Mar 15 03:14:04 2000   | @ 1 min   | Wed Mar 15 03:15:04 2000   | Wed Mar 15 03:13:04 2000
+ Wed Mar 15 03:14:04 2000   | @ 5 hours | Wed Mar 15 08:14:04 2000   | Tue Mar 14 22:14:04 2000
+ Wed Mar 15 08:14:01 2000   | @ 1 min   | Wed Mar 15 08:15:01 2000   | Wed Mar 15 08:13:01 2000
+ Wed Mar 15 08:14:01 2000   | @ 5 hours | Wed Mar 15 13:14:01 2000   | Wed Mar 15 03:14:01 2000
+ Wed Mar 15 12:14:03 2000   | @ 1 min   | Wed Mar 15 12:15:03 2000   | Wed Mar 15 12:13:03 2000
+ Wed Mar 15 12:14:03 2000   | @ 5 hours | Wed Mar 15 17:14:03 2000   | Wed Mar 15 07:14:03 2000
+ Wed Mar 15 13:14:02 2000   | @ 1 min   | Wed Mar 15 13:15:02 2000   | Wed Mar 15 13:13:02 2000
+ Wed Mar 15 13:14:02 2000   | @ 5 hours | Wed Mar 15 18:14:02 2000   | Wed Mar 15 08:14:02 2000
+ Sun Dec 31 17:32:01 2000   | @ 1 min   | Sun Dec 31 17:33:01 2000   | Sun Dec 31 17:31:01 2000
+ Sun Dec 31 17:32:01 2000   | @ 5 hours | Sun Dec 31 22:32:01 2000   | Sun Dec 31 12:32:01 2000
+(104 rows)
+
+SELECT t.f1 AS t, i.f1 AS i, t.f1 + i.f1 AS "add", t.f1 - i.f1 AS "subtract"
+  FROM TIME_HOROLOGY_TBL t, INTERVAL_HOROLOGY_TBL i
+  ORDER BY 1,2;
+      t      |               i               |     add     |  subtract   
+-------------+-------------------------------+-------------+-------------
+ 00:00:00    | @ 14 secs ago                 | 23:59:46    | 00:00:14
+ 00:00:00    | @ 1 min                       | 00:01:00    | 23:59:00
+ 00:00:00    | @ 5 hours                     | 05:00:00    | 19:00:00
+ 00:00:00    | @ 1 day 2 hours 3 mins 4 secs | 02:03:04    | 21:56:56
+ 00:00:00    | @ 10 days                     | 00:00:00    | 00:00:00
+ 00:00:00    | @ 3 mons                      | 00:00:00    | 00:00:00
+ 00:00:00    | @ 5 mons                      | 00:00:00    | 00:00:00
+ 00:00:00    | @ 5 mons 12 hours             | 12:00:00    | 12:00:00
+ 00:00:00    | @ 6 years                     | 00:00:00    | 00:00:00
+ 00:00:00    | @ 34 years                    | 00:00:00    | 00:00:00
+ 01:00:00    | @ 14 secs ago                 | 00:59:46    | 01:00:14
+ 01:00:00    | @ 1 min                       | 01:01:00    | 00:59:00
+ 01:00:00    | @ 5 hours                     | 06:00:00    | 20:00:00
+ 01:00:00    | @ 1 day 2 hours 3 mins 4 secs | 03:03:04    | 22:56:56
+ 01:00:00    | @ 10 days                     | 01:00:00    | 01:00:00
+ 01:00:00    | @ 3 mons                      | 01:00:00    | 01:00:00
+ 01:00:00    | @ 5 mons                      | 01:00:00    | 01:00:00
+ 01:00:00    | @ 5 mons 12 hours             | 13:00:00    | 13:00:00
+ 01:00:00    | @ 6 years                     | 01:00:00    | 01:00:00
+ 01:00:00    | @ 34 years                    | 01:00:00    | 01:00:00
+ 02:03:00    | @ 14 secs ago                 | 02:02:46    | 02:03:14
+ 02:03:00    | @ 1 min                       | 02:04:00    | 02:02:00
+ 02:03:00    | @ 5 hours                     | 07:03:00    | 21:03:00
+ 02:03:00    | @ 1 day 2 hours 3 mins 4 secs | 04:06:04    | 23:59:56
+ 02:03:00    | @ 10 days                     | 02:03:00    | 02:03:00
+ 02:03:00    | @ 3 mons                      | 02:03:00    | 02:03:00
+ 02:03:00    | @ 5 mons                      | 02:03:00    | 02:03:00
+ 02:03:00    | @ 5 mons 12 hours             | 14:03:00    | 14:03:00
+ 02:03:00    | @ 6 years                     | 02:03:00    | 02:03:00
+ 02:03:00    | @ 34 years                    | 02:03:00    | 02:03:00
+ 11:59:00    | @ 14 secs ago                 | 11:58:46    | 11:59:14
+ 11:59:00    | @ 1 min                       | 12:00:00    | 11:58:00
+ 11:59:00    | @ 5 hours                     | 16:59:00    | 06:59:00
+ 11:59:00    | @ 1 day 2 hours 3 mins 4 secs | 14:02:04    | 09:55:56
+ 11:59:00    | @ 10 days                     | 11:59:00    | 11:59:00
+ 11:59:00    | @ 3 mons                      | 11:59:00    | 11:59:00
+ 11:59:00    | @ 5 mons                      | 11:59:00    | 11:59:00
+ 11:59:00    | @ 5 mons 12 hours             | 23:59:00    | 23:59:00
+ 11:59:00    | @ 6 years                     | 11:59:00    | 11:59:00
+ 11:59:00    | @ 34 years                    | 11:59:00    | 11:59:00
+ 12:00:00    | @ 14 secs ago                 | 11:59:46    | 12:00:14
+ 12:00:00    | @ 1 min                       | 12:01:00    | 11:59:00
+ 12:00:00    | @ 5 hours                     | 17:00:00    | 07:00:00
+ 12:00:00    | @ 1 day 2 hours 3 mins 4 secs | 14:03:04    | 09:56:56
+ 12:00:00    | @ 10 days                     | 12:00:00    | 12:00:00
+ 12:00:00    | @ 3 mons                      | 12:00:00    | 12:00:00
+ 12:00:00    | @ 5 mons                      | 12:00:00    | 12:00:00
+ 12:00:00    | @ 5 mons 12 hours             | 00:00:00    | 00:00:00
+ 12:00:00    | @ 6 years                     | 12:00:00    | 12:00:00
+ 12:00:00    | @ 34 years                    | 12:00:00    | 12:00:00
+ 12:01:00    | @ 14 secs ago                 | 12:00:46    | 12:01:14
+ 12:01:00    | @ 1 min                       | 12:02:00    | 12:00:00
+ 12:01:00    | @ 5 hours                     | 17:01:00    | 07:01:00
+ 12:01:00    | @ 1 day 2 hours 3 mins 4 secs | 14:04:04    | 09:57:56
+ 12:01:00    | @ 10 days                     | 12:01:00    | 12:01:00
+ 12:01:00    | @ 3 mons                      | 12:01:00    | 12:01:00
+ 12:01:00    | @ 5 mons                      | 12:01:00    | 12:01:00
+ 12:01:00    | @ 5 mons 12 hours             | 00:01:00    | 00:01:00
+ 12:01:00    | @ 6 years                     | 12:01:00    | 12:01:00
+ 12:01:00    | @ 34 years                    | 12:01:00    | 12:01:00
+ 15:36:39    | @ 14 secs ago                 | 15:36:25    | 15:36:53
+ 15:36:39    | @ 14 secs ago                 | 15:36:25    | 15:36:53
+ 15:36:39    | @ 1 min                       | 15:37:39    | 15:35:39
+ 15:36:39    | @ 1 min                       | 15:37:39    | 15:35:39
+ 15:36:39    | @ 5 hours                     | 20:36:39    | 10:36:39
+ 15:36:39    | @ 5 hours                     | 20:36:39    | 10:36:39
+ 15:36:39    | @ 1 day 2 hours 3 mins 4 secs | 17:39:43    | 13:33:35
+ 15:36:39    | @ 1 day 2 hours 3 mins 4 secs | 17:39:43    | 13:33:35
+ 15:36:39    | @ 10 days                     | 15:36:39    | 15:36:39
+ 15:36:39    | @ 10 days                     | 15:36:39    | 15:36:39
+ 15:36:39    | @ 3 mons                      | 15:36:39    | 15:36:39
+ 15:36:39    | @ 3 mons                      | 15:36:39    | 15:36:39
+ 15:36:39    | @ 5 mons                      | 15:36:39    | 15:36:39
+ 15:36:39    | @ 5 mons                      | 15:36:39    | 15:36:39
+ 15:36:39    | @ 5 mons 12 hours             | 03:36:39    | 03:36:39
+ 15:36:39    | @ 5 mons 12 hours             | 03:36:39    | 03:36:39
+ 15:36:39    | @ 6 years                     | 15:36:39    | 15:36:39
+ 15:36:39    | @ 6 years                     | 15:36:39    | 15:36:39
+ 15:36:39    | @ 34 years                    | 15:36:39    | 15:36:39
+ 15:36:39    | @ 34 years                    | 15:36:39    | 15:36:39
+ 23:59:00    | @ 14 secs ago                 | 23:58:46    | 23:59:14
+ 23:59:00    | @ 1 min                       | 00:00:00    | 23:58:00
+ 23:59:00    | @ 5 hours                     | 04:59:00    | 18:59:00
+ 23:59:00    | @ 1 day 2 hours 3 mins 4 secs | 02:02:04    | 21:55:56
+ 23:59:00    | @ 10 days                     | 23:59:00    | 23:59:00
+ 23:59:00    | @ 3 mons                      | 23:59:00    | 23:59:00
+ 23:59:00    | @ 5 mons                      | 23:59:00    | 23:59:00
+ 23:59:00    | @ 5 mons 12 hours             | 11:59:00    | 11:59:00
+ 23:59:00    | @ 6 years                     | 23:59:00    | 23:59:00
+ 23:59:00    | @ 34 years                    | 23:59:00    | 23:59:00
+ 23:59:59.99 | @ 14 secs ago                 | 23:59:45.99 | 00:00:13.99
+ 23:59:59.99 | @ 1 min                       | 00:00:59.99 | 23:58:59.99
+ 23:59:59.99 | @ 5 hours                     | 04:59:59.99 | 18:59:59.99
+ 23:59:59.99 | @ 1 day 2 hours 3 mins 4 secs | 02:03:03.99 | 21:56:55.99
+ 23:59:59.99 | @ 10 days                     | 23:59:59.99 | 23:59:59.99
+ 23:59:59.99 | @ 3 mons                      | 23:59:59.99 | 23:59:59.99
+ 23:59:59.99 | @ 5 mons                      | 23:59:59.99 | 23:59:59.99
+ 23:59:59.99 | @ 5 mons 12 hours             | 11:59:59.99 | 11:59:59.99
+ 23:59:59.99 | @ 6 years                     | 23:59:59.99 | 23:59:59.99
+ 23:59:59.99 | @ 34 years                    | 23:59:59.99 | 23:59:59.99
+(100 rows)
+
+SELECT t.f1 AS t, i.f1 AS i, t.f1 + i.f1 AS "add", t.f1 - i.f1 AS "subtract"
+  FROM TIMETZ_HOROLOGY_TBL t, INTERVAL_HOROLOGY_TBL i
+  ORDER BY 1,2;
+       t        |               i               |      add       |    subtract    
+----------------+-------------------------------+----------------+----------------
+ 00:01:00-07    | @ 14 secs ago                 | 00:00:46-07    | 00:01:14-07
+ 00:01:00-07    | @ 1 min                       | 00:02:00-07    | 00:00:00-07
+ 00:01:00-07    | @ 5 hours                     | 05:01:00-07    | 19:01:00-07
+ 00:01:00-07    | @ 1 day 2 hours 3 mins 4 secs | 02:04:04-07    | 21:57:56-07
+ 00:01:00-07    | @ 10 days                     | 00:01:00-07    | 00:01:00-07
+ 00:01:00-07    | @ 3 mons                      | 00:01:00-07    | 00:01:00-07
+ 00:01:00-07    | @ 5 mons                      | 00:01:00-07    | 00:01:00-07
+ 00:01:00-07    | @ 5 mons 12 hours             | 12:01:00-07    | 12:01:00-07
+ 00:01:00-07    | @ 6 years                     | 00:01:00-07    | 00:01:00-07
+ 00:01:00-07    | @ 34 years                    | 00:01:00-07    | 00:01:00-07
+ 01:00:00-07    | @ 14 secs ago                 | 00:59:46-07    | 01:00:14-07
+ 01:00:00-07    | @ 1 min                       | 01:01:00-07    | 00:59:00-07
+ 01:00:00-07    | @ 5 hours                     | 06:00:00-07    | 20:00:00-07
+ 01:00:00-07    | @ 1 day 2 hours 3 mins 4 secs | 03:03:04-07    | 22:56:56-07
+ 01:00:00-07    | @ 10 days                     | 01:00:00-07    | 01:00:00-07
+ 01:00:00-07    | @ 3 mons                      | 01:00:00-07    | 01:00:00-07
+ 01:00:00-07    | @ 5 mons                      | 01:00:00-07    | 01:00:00-07
+ 01:00:00-07    | @ 5 mons 12 hours             | 13:00:00-07    | 13:00:00-07
+ 01:00:00-07    | @ 6 years                     | 01:00:00-07    | 01:00:00-07
+ 01:00:00-07    | @ 34 years                    | 01:00:00-07    | 01:00:00-07
+ 02:03:00-07    | @ 14 secs ago                 | 02:02:46-07    | 02:03:14-07
+ 02:03:00-07    | @ 1 min                       | 02:04:00-07    | 02:02:00-07
+ 02:03:00-07    | @ 5 hours                     | 07:03:00-07    | 21:03:00-07
+ 02:03:00-07    | @ 1 day 2 hours 3 mins 4 secs | 04:06:04-07    | 23:59:56-07
+ 02:03:00-07    | @ 10 days                     | 02:03:00-07    | 02:03:00-07
+ 02:03:00-07    | @ 3 mons                      | 02:03:00-07    | 02:03:00-07
+ 02:03:00-07    | @ 5 mons                      | 02:03:00-07    | 02:03:00-07
+ 02:03:00-07    | @ 5 mons 12 hours             | 14:03:00-07    | 14:03:00-07
+ 02:03:00-07    | @ 6 years                     | 02:03:00-07    | 02:03:00-07
+ 02:03:00-07    | @ 34 years                    | 02:03:00-07    | 02:03:00-07
+ 08:08:00-04    | @ 14 secs ago                 | 08:07:46-04    | 08:08:14-04
+ 08:08:00-04    | @ 1 min                       | 08:09:00-04    | 08:07:00-04
+ 08:08:00-04    | @ 5 hours                     | 13:08:00-04    | 03:08:00-04
+ 08:08:00-04    | @ 1 day 2 hours 3 mins 4 secs | 10:11:04-04    | 06:04:56-04
+ 08:08:00-04    | @ 10 days                     | 08:08:00-04    | 08:08:00-04
+ 08:08:00-04    | @ 3 mons                      | 08:08:00-04    | 08:08:00-04
+ 08:08:00-04    | @ 5 mons                      | 08:08:00-04    | 08:08:00-04
+ 08:08:00-04    | @ 5 mons 12 hours             | 20:08:00-04    | 20:08:00-04
+ 08:08:00-04    | @ 6 years                     | 08:08:00-04    | 08:08:00-04
+ 08:08:00-04    | @ 34 years                    | 08:08:00-04    | 08:08:00-04
+ 07:07:00-08    | @ 14 secs ago                 | 07:06:46-08    | 07:07:14-08
+ 07:07:00-08    | @ 1 min                       | 07:08:00-08    | 07:06:00-08
+ 07:07:00-08    | @ 5 hours                     | 12:07:00-08    | 02:07:00-08
+ 07:07:00-08    | @ 1 day 2 hours 3 mins 4 secs | 09:10:04-08    | 05:03:56-08
+ 07:07:00-08    | @ 10 days                     | 07:07:00-08    | 07:07:00-08
+ 07:07:00-08    | @ 3 mons                      | 07:07:00-08    | 07:07:00-08
+ 07:07:00-08    | @ 5 mons                      | 07:07:00-08    | 07:07:00-08
+ 07:07:00-08    | @ 5 mons 12 hours             | 19:07:00-08    | 19:07:00-08
+ 07:07:00-08    | @ 6 years                     | 07:07:00-08    | 07:07:00-08
+ 07:07:00-08    | @ 34 years                    | 07:07:00-08    | 07:07:00-08
+ 11:59:00-07    | @ 14 secs ago                 | 11:58:46-07    | 11:59:14-07
+ 11:59:00-07    | @ 1 min                       | 12:00:00-07    | 11:58:00-07
+ 11:59:00-07    | @ 5 hours                     | 16:59:00-07    | 06:59:00-07
+ 11:59:00-07    | @ 1 day 2 hours 3 mins 4 secs | 14:02:04-07    | 09:55:56-07
+ 11:59:00-07    | @ 10 days                     | 11:59:00-07    | 11:59:00-07
+ 11:59:00-07    | @ 3 mons                      | 11:59:00-07    | 11:59:00-07
+ 11:59:00-07    | @ 5 mons                      | 11:59:00-07    | 11:59:00-07
+ 11:59:00-07    | @ 5 mons 12 hours             | 23:59:00-07    | 23:59:00-07
+ 11:59:00-07    | @ 6 years                     | 11:59:00-07    | 11:59:00-07
+ 11:59:00-07    | @ 34 years                    | 11:59:00-07    | 11:59:00-07
+ 12:00:00-07    | @ 14 secs ago                 | 11:59:46-07    | 12:00:14-07
+ 12:00:00-07    | @ 1 min                       | 12:01:00-07    | 11:59:00-07
+ 12:00:00-07    | @ 5 hours                     | 17:00:00-07    | 07:00:00-07
+ 12:00:00-07    | @ 1 day 2 hours 3 mins 4 secs | 14:03:04-07    | 09:56:56-07
+ 12:00:00-07    | @ 10 days                     | 12:00:00-07    | 12:00:00-07
+ 12:00:00-07    | @ 3 mons                      | 12:00:00-07    | 12:00:00-07
+ 12:00:00-07    | @ 5 mons                      | 12:00:00-07    | 12:00:00-07
+ 12:00:00-07    | @ 5 mons 12 hours             | 00:00:00-07    | 00:00:00-07
+ 12:00:00-07    | @ 6 years                     | 12:00:00-07    | 12:00:00-07
+ 12:00:00-07    | @ 34 years                    | 12:00:00-07    | 12:00:00-07
+ 12:01:00-07    | @ 14 secs ago                 | 12:00:46-07    | 12:01:14-07
+ 12:01:00-07    | @ 1 min                       | 12:02:00-07    | 12:00:00-07
+ 12:01:00-07    | @ 5 hours                     | 17:01:00-07    | 07:01:00-07
+ 12:01:00-07    | @ 1 day 2 hours 3 mins 4 secs | 14:04:04-07    | 09:57:56-07
+ 12:01:00-07    | @ 10 days                     | 12:01:00-07    | 12:01:00-07
+ 12:01:00-07    | @ 3 mons                      | 12:01:00-07    | 12:01:00-07
+ 12:01:00-07    | @ 5 mons                      | 12:01:00-07    | 12:01:00-07
+ 12:01:00-07    | @ 5 mons 12 hours             | 00:01:00-07    | 00:01:00-07
+ 12:01:00-07    | @ 6 years                     | 12:01:00-07    | 12:01:00-07
+ 12:01:00-07    | @ 34 years                    | 12:01:00-07    | 12:01:00-07
+ 15:36:39-04    | @ 14 secs ago                 | 15:36:25-04    | 15:36:53-04
+ 15:36:39-04    | @ 1 min                       | 15:37:39-04    | 15:35:39-04
+ 15:36:39-04    | @ 5 hours                     | 20:36:39-04    | 10:36:39-04
+ 15:36:39-04    | @ 1 day 2 hours 3 mins 4 secs | 17:39:43-04    | 13:33:35-04
+ 15:36:39-04    | @ 10 days                     | 15:36:39-04    | 15:36:39-04
+ 15:36:39-04    | @ 3 mons                      | 15:36:39-04    | 15:36:39-04
+ 15:36:39-04    | @ 5 mons                      | 15:36:39-04    | 15:36:39-04
+ 15:36:39-04    | @ 5 mons 12 hours             | 03:36:39-04    | 03:36:39-04
+ 15:36:39-04    | @ 6 years                     | 15:36:39-04    | 15:36:39-04
+ 15:36:39-04    | @ 34 years                    | 15:36:39-04    | 15:36:39-04
+ 15:36:39-05    | @ 14 secs ago                 | 15:36:25-05    | 15:36:53-05
+ 15:36:39-05    | @ 1 min                       | 15:37:39-05    | 15:35:39-05
+ 15:36:39-05    | @ 5 hours                     | 20:36:39-05    | 10:36:39-05
+ 15:36:39-05    | @ 1 day 2 hours 3 mins 4 secs | 17:39:43-05    | 13:33:35-05
+ 15:36:39-05    | @ 10 days                     | 15:36:39-05    | 15:36:39-05
+ 15:36:39-05    | @ 3 mons                      | 15:36:39-05    | 15:36:39-05
+ 15:36:39-05    | @ 5 mons                      | 15:36:39-05    | 15:36:39-05
+ 15:36:39-05    | @ 5 mons 12 hours             | 03:36:39-05    | 03:36:39-05
+ 15:36:39-05    | @ 6 years                     | 15:36:39-05    | 15:36:39-05
+ 15:36:39-05    | @ 34 years                    | 15:36:39-05    | 15:36:39-05
+ 23:59:00-07    | @ 14 secs ago                 | 23:58:46-07    | 23:59:14-07
+ 23:59:00-07    | @ 1 min                       | 00:00:00-07    | 23:58:00-07
+ 23:59:00-07    | @ 5 hours                     | 04:59:00-07    | 18:59:00-07
+ 23:59:00-07    | @ 1 day 2 hours 3 mins 4 secs | 02:02:04-07    | 21:55:56-07
+ 23:59:00-07    | @ 10 days                     | 23:59:00-07    | 23:59:00-07
+ 23:59:00-07    | @ 3 mons                      | 23:59:00-07    | 23:59:00-07
+ 23:59:00-07    | @ 5 mons                      | 23:59:00-07    | 23:59:00-07
+ 23:59:00-07    | @ 5 mons 12 hours             | 11:59:00-07    | 11:59:00-07
+ 23:59:00-07    | @ 6 years                     | 23:59:00-07    | 23:59:00-07
+ 23:59:00-07    | @ 34 years                    | 23:59:00-07    | 23:59:00-07
+ 23:59:59.99-07 | @ 14 secs ago                 | 23:59:45.99-07 | 00:00:13.99-07
+ 23:59:59.99-07 | @ 1 min                       | 00:00:59.99-07 | 23:58:59.99-07
+ 23:59:59.99-07 | @ 5 hours                     | 04:59:59.99-07 | 18:59:59.99-07
+ 23:59:59.99-07 | @ 1 day 2 hours 3 mins 4 secs | 02:03:03.99-07 | 21:56:55.99-07
+ 23:59:59.99-07 | @ 10 days                     | 23:59:59.99-07 | 23:59:59.99-07
+ 23:59:59.99-07 | @ 3 mons                      | 23:59:59.99-07 | 23:59:59.99-07
+ 23:59:59.99-07 | @ 5 mons                      | 23:59:59.99-07 | 23:59:59.99-07
+ 23:59:59.99-07 | @ 5 mons 12 hours             | 11:59:59.99-07 | 11:59:59.99-07
+ 23:59:59.99-07 | @ 6 years                     | 23:59:59.99-07 | 23:59:59.99-07
+ 23:59:59.99-07 | @ 34 years                    | 23:59:59.99-07 | 23:59:59.99-07
+(120 rows)
+
+-- 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";
+ True 
+------
+ t
+(1 row)
+
+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 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 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 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 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 
+------
+ t
+(1 row)
+
+SELECT (time '00:00', interval '1 hour')
+  OVERLAPS (time '00:30', interval '1 hour') AS "True";
+ True 
+------
+ t
+(1 row)
+
+SELECT (time '00:00', interval '1 hour')
+  OVERLAPS (time '01:30', interval '1 hour') AS "False";
+ False 
+-------
+ 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 "False";
+ False 
+-------
+ f
+(1 row)
+
+CREATE TABLE TEMP_TIMESTAMP (f1 timestamp with time zone);
+-- get some candidate input values
+INSERT INTO TEMP_TIMESTAMP (f1)
+  SELECT d1 FROM TIMESTAMP_HOROLOGY_TBL
+  WHERE d1 BETWEEN '13-jun-1957' AND '1-jan-1997'
+   OR d1 BETWEEN '1-jan-1999' AND '1-jan-2010';
+SELECT '' AS "16", f1 AS "timestamp"
+  FROM TEMP_TIMESTAMP
+  ORDER BY "timestamp";
+ 16 |          timestamp           
+----+------------------------------
+    | 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
+    | Mon Dec 30 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 02:14:05 2000 PST
+    | Wed Mar 15 03:14:04 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
+    | Sat Sep 22 18:19:20 2001 PDT
+(16 rows)
+
+SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS "interval", d.f1 + t.f1 AS plus
+  FROM TEMP_TIMESTAMP d, INTERVAL_HOROLOGY_TBL t
+  ORDER BY plus, "timestamp", "interval";
+ 160 |          timestamp           |           interval            |             plus             
+-----+------------------------------+-------------------------------+------------------------------
+     | 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 00:00:00 1970 PDT
+     | Thu Jan 01 00:00:00 1970 PST | @ 5 mons 12 hours             | Mon Jun 01 12: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
+     | Thu Feb 29 17:32:01 1996 PST | @ 14 secs ago                 | Thu Feb 29 17:31:47 1996 PST
+     | Thu Feb 29 17:32:01 1996 PST | @ 1 min                       | Thu Feb 29 17:33:01 1996 PST
+     | Wed Feb 28 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Feb 29 19:35:05 1996 PST
+     | Thu Feb 29 17:32:01 1996 PST | @ 5 hours                     | Thu Feb 29 22:32:01 1996 PST
+     | Fri Mar 01 17:32:01 1996 PST | @ 14 secs ago                 | Fri Mar 01 17:31:47 1996 PST
+     | Fri Mar 01 17:32:01 1996 PST | @ 1 min                       | Fri Mar 01 17:33:01 1996 PST
+     | Thu Feb 29 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Fri Mar 01 19:35:05 1996 PST
+     | Fri Mar 01 17:32:01 1996 PST | @ 5 hours                     | Fri Mar 01 22:32:01 1996 PST
+     | Fri Mar 01 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Mar 02 19:35:05 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
+     | 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 | @ 14 secs ago                 | Tue Dec 31 17:31:47 1996 PST
+     | Tue Dec 31 17:32:01 1996 PST | @ 1 min                       | Tue Dec 31 17:33:01 1996 PST
+     | Mon Dec 30 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Dec 31 19:35:05 1996 PST
+     | Tue Dec 31 17:32:01 1996 PST | @ 5 hours                     | Tue Dec 31 22:32:01 1996 PST
+     | Tue Dec 31 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Wed Jan 01 19:35:05 1997 PST
+     | Mon Dec 30 17:32:01 1996 PST | @ 10 days                     | Thu Jan 09 17:32:01 1997 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
+     | 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 | @ 14 secs ago                 | Sat Jan 01 17:31:47 2000 PST
+     | Sat Jan 01 17:32:01 2000 PST | @ 1 min                       | Sat Jan 01 17:33:01 2000 PST
+     | Fri Dec 31 17:32:01 1999 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Jan 01 19:35:05 2000 PST
+     | Sat Jan 01 17:32:01 2000 PST | @ 5 hours                     | Sat Jan 01 22:32:01 2000 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 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 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 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 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 08:14:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Thu Mar 16 10:17:05 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 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 02:14:05 2000 PST | @ 3 mons                      | Thu Jun 15 02:14:05 2000 PDT
+     | Wed Mar 15 03:14:04 2000 PST | @ 3 mons                      | Thu Jun 15 03:14:04 2000 PDT
+     | Wed Mar 15 08:14:01 2000 PST | @ 3 mons                      | Thu Jun 15 08:14:01 2000 PDT
+     | Wed Mar 15 12:14:03 2000 PST | @ 3 mons                      | Thu Jun 15 12:14:03 2000 PDT
+     | Wed Mar 15 13:14:02 2000 PST | @ 3 mons                      | Thu Jun 15 13:14:02 2000 PDT
+     | Wed Mar 15 02:14:05 2000 PST | @ 5 mons                      | Tue Aug 15 02:14:05 2000 PDT
+     | Wed Mar 15 03:14:04 2000 PST | @ 5 mons                      | Tue Aug 15 03:14:04 2000 PDT
+     | Wed Mar 15 08:14:01 2000 PST | @ 5 mons                      | Tue Aug 15 08:14:01 2000 PDT
+     | Wed Mar 15 12:14:03 2000 PST | @ 5 mons                      | Tue Aug 15 12:14:03 2000 PDT
+     | Wed Mar 15 13:14:02 2000 PST | @ 5 mons                      | Tue Aug 15 13:14:02 2000 PDT
+     | Wed Mar 15 02:14:05 2000 PST | @ 5 mons 12 hours             | Tue Aug 15 14:14:05 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 08:14:01 2000 PST | @ 5 mons 12 hours             | Tue Aug 15 20:14:01 2000 PDT
+     | Wed Mar 15 12:14:03 2000 PST | @ 5 mons 12 hours             | Wed Aug 16 00:14:03 2000 PDT
+     | Wed Mar 15 13:14:02 2000 PST | @ 5 mons 12 hours             | Wed Aug 16 01: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
+     | Mon Jan 01 17:32:01 2001 PST | @ 14 secs ago                 | Mon Jan 01 17:31:47 2001 PST
+     | Mon Jan 01 17:32:01 2001 PST | @ 1 min                       | Mon Jan 01 17:33:01 2001 PST
+     | Sun Dec 31 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Mon Jan 01 19:35:05 2001 PST
+     | Mon Jan 01 17:32:01 2001 PST | @ 5 hours                     | Mon Jan 01 22:32:01 2001 PST
+     | Mon Jan 01 17:32:01 2001 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Jan 02 19:35:05 2001 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
+     | 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 18:19:20 2001 PST
+     | Sat Sep 22 18:19:20 2001 PDT | @ 5 mons                      | Fri Feb 22 18:19:20 2002 PST
+     | Sat Sep 22 18:19:20 2001 PDT | @ 5 mons 12 hours             | Sat Feb 23 06:19:20 2002 PST
+     | Wed Feb 28 17:32:01 1996 PST | @ 6 years                     | Thu Feb 28 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
+     | 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 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 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
+     | 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                    | Thu Feb 28 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 02:14:05 2000 PST | @ 34 years                    | Wed Mar 15 02:14:05 2034 PDT
+     | Wed Mar 15 03:14:04 2000 PST | @ 34 years                    | Wed Mar 15 03:14:04 2034 PDT
+     | Wed Mar 15 08:14:01 2000 PST | @ 34 years                    | Wed Mar 15 08:14:01 2034 PDT
+     | Wed Mar 15 12:14:03 2000 PST | @ 34 years                    | Wed Mar 15 12:14:03 2034 PDT
+     | Wed Mar 15 13:14:02 2000 PST | @ 34 years                    | Wed Mar 15 13:14:02 2034 PDT
+     | 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
+     | Sat Sep 22 18:19:20 2001 PDT | @ 34 years                    | Sat Sep 22 18:19:20 2035 PDT
+(160 rows)
+
+SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS "interval", d.f1 - t.f1 AS minus
+  FROM TEMP_TIMESTAMP d, INTERVAL_HOROLOGY_TBL t
+  WHERE isfinite(d.f1)
+  ORDER BY minus, "timestamp", "interval";
+ 160 |          timestamp           |           interval            |            minus             
+-----+------------------------------+-------------------------------+------------------------------
+     | 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                    | Wed Feb 28 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
+     | 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 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 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
+     | 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 12:00:00 1969 PDT
+     | Thu Jan 01 00:00:00 1970 PST | @ 5 mons                      | Fri Aug 01 00:00:00 1969 PDT
+     | Thu Jan 01 00:00:00 1970 PST | @ 3 mons                      | Wed Oct 01 00: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                     | Wed Feb 28 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 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 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
+     | 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 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
+     | 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
+     | 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 | @ 10 days                     | Tue Feb 20 17:32:01 1996 PST
+     | Wed Feb 28 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Tue Feb 27 15:28:57 1996 PST
+     | Wed Feb 28 17:32:01 199

<TRUNCATED>


Mime
View raw message