QUERY: SET DateStyle = 'Postgres,noneuropean';
QUERY: SELECT datetime('1994-01-01', '11:00') AS "Jan_01_1994_11am";
-Jan_01_1994_11am
+Jan_01_1994_11am
----------------------------
Sat Jan 01 11:00:00 1994 PST
(1 row)
QUERY: INSERT INTO DATETIME_TBL VALUES ('Jan 01 17:32:01 1997');
QUERY: INSERT INTO DATETIME_TBL VALUES ('Feb 28 17:32:01 1997');
QUERY: INSERT INTO DATETIME_TBL VALUES ('Feb 29 17:32:01 1997');
+ERROR: Bad datetime external representation 'Feb 29 17:32:01 1997'
QUERY: INSERT INTO DATETIME_TBL VALUES ('Mar 01 17:32:01 1997');
QUERY: INSERT INTO DATETIME_TBL VALUES ('Dec 30 17:32:01 1997');
QUERY: INSERT INTO DATETIME_TBL VALUES ('Dec 31 17:32:01 1997');
|Wed Jan 01 17:32:01 1997 PST
|Fri Feb 28 17:32:01 1997 PST
|Sat Mar 01 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
-(62 rows)
+(61 rows)
QUERY: SELECT '' AS fortythree, d1 FROM DATETIME_TBL
WHERE d1 > '1997-01-02'::datetime and d1 != 'current'::datetime;
|Sat Feb 16 17:32:01 2097
|Fri Feb 28 17:32:01 1997 PST
|Sat Mar 01 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
-(43 rows)
+(42 rows)
QUERY: SELECT '' AS fifteen, d1 FROM DATETIME_TBL
WHERE d1 < '1997-01-02'::datetime and d1 != 'current'::datetime;
|Wed Jan 01 17:32:01 1997 PST
|Fri Feb 28 17:32:01 1997 PST
|Sat Mar 01 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
-(58 rows)
+(57 rows)
QUERY: SELECT '' AS sixteen, d1 FROM DATETIME_TBL
WHERE d1 <= '1997-01-02'::datetime and d1 != 'current'::datetime;
|Sat Feb 16 17:32:01 2097
|Fri Feb 28 17:32:01 1997 PST
|Sat Mar 01 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
-(44 rows)
+(43 rows)
QUERY: SELECT '' AS sixtythree, d1 + '1 year'::timespan AS one_year FROM DATETIME_TBL;
sixtythree|one_year
|Thu Jan 01 17:32:01 1998 PST
|Sat Feb 28 17:32:01 1998 PST
|Sun Mar 01 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
-(62 rows)
+(61 rows)
QUERY: SELECT '' AS sixtythree, d1 - '1 year'::timespan AS one_year FROM DATETIME_TBL;
sixtythree|one_year
|Mon Jan 01 17:32:01 1996 PST
|Wed Feb 28 17:32:01 1996 PST
|Fri Mar 01 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
-(62 rows)
+(61 rows)
QUERY: SELECT '' AS fifty, d1 - '1997-01-02'::datetime AS diff
FROM DATETIME_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
|@ 6 hours 27 mins 59 secs ago
|@ 57 days 17 hours 32 mins 1 sec
|@ 58 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
-(49 rows)
+(48 rows)
QUERY: SELECT '' AS fortynine, date_part( 'year', d1) AS year, date_part( 'month', d1) AS month,
date_part( 'day', d1) AS day, date_part( 'hour', d1) AS hour,
|1997| 1| 1| 17| 32| 1
|1997| 2| 28| 17| 32| 1
|1997| 3| 1| 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
-(49 rows)
+(48 rows)
QUERY: SELECT '' AS fortynine, date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
date_part( 'usec', d1) AS usec
| 1| 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
-(49 rows)
+(48 rows)
|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
- |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
|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
-(50 rows)
+(49 rows)
QUERY: SELECT '' AS four, f1 AS abstime,
date_part('year', f1) AS year, date_part('month', f1) AS month,
|Wed Jan 01 17:32:01 1997 PST
|Fri Feb 28 17:32:01 1997 PST
|Sat Mar 01 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
-(62 rows)
+(61 rows)
QUERY: SELECT '' AS eight, f1 AS us_postgres FROM ABSTIME_TBL;
eight|us_postgres
|1997-01-01 17:32:01-08
|1997-02-28 17:32:01-08
|1997-03-01 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
-(62 rows)
+(61 rows)
QUERY: SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
eight|us_iso
|01/01/1997 17:32:01.00 PST
|02/28/1997 17:32:01.00 PST
|03/01/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
-(62 rows)
+(61 rows)
QUERY: SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
eight|us_sql
|Wed 01 Jan 17:32:01 1997 PST
|Fri 28 Feb 17:32:01 1997 PST
|Sat 01 Mar 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
|Sun 31 Dec 17:32:01 2000 PST
|Mon 01 Jan 17:32:01 2001 PST
|Thu 13 Jun 00:00:00 1957 PDT
-(63 rows)
+(62 rows)
QUERY: SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
eight|european_postgres
|1997-01-01 17:32:01-08
|1997-02-28 17:32:01-08
|1997-03-01 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-12-31 17:32:01-08
|2001-01-01 17:32:01-08
|1957-06-13 00:00:00-07
-(63 rows)
+(62 rows)
QUERY: SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
eight|european_iso
|01/01/1997 17:32:01.00 PST
|28/02/1997 17:32:01.00 PST
|01/03/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
|31/12/2000 17:32:01.00 PST
|01/01/2001 17:32:01.00 PST
|13/06/1957 00:00:00.00 PDT
-(63 rows)
+(62 rows)
QUERY: SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
eight|european_sql
|Wed Jan 01 17:32:01 1997 PST
|Fri Feb 28 17:32:01 1997 PST
|Sat Mar 01 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
|Sun Dec 31 17:32:01 2000 PST
|Mon Jan 01 17:32:01 2001 PST
|Thu Jun 13 00:00:00 1957 PDT
-(63 rows)
+(62 rows)
QUERY: SELECT '' AS eight, f1 AS us_postgres FROM ABSTIME_TBL;
eight|us_postgres
|1997-01-01 17:32:01-08
|1997-02-28 17:32:01-08
|1997-03-01 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-12-31 17:32:01-08
|2001-01-01 17:32:01-08
|1957-06-13 00:00:00-07
-(63 rows)
+(62 rows)
QUERY: SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
eight|us_iso
|01/01/1997 17:32:01.00 PST
|02/28/1997 17:32:01.00 PST
|03/01/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
|12/31/2000 17:32:01.00 PST
|01/01/2001 17:32:01.00 PST
|06/13/1957 00:00:00.00 PDT
-(63 rows)
+(62 rows)
QUERY: SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
eight|us_sql
|Wed 01 Jan 17:32:01 1997 PST
|Fri 28 Feb 17:32:01 1997 PST
|Sat 01 Mar 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
|Mon 01 Jan 17:32:01 2001 PST
|Thu 13 Jun 00:00:00 1957 PDT
|Thu 13 Jun 00:00:00 1957 PDT
-(64 rows)
+(63 rows)
QUERY: SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
eight|european_postgres
|1997-01-01 17:32:01-08
|1997-02-28 17:32:01-08
|1997-03-01 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
|2001-01-01 17:32:01-08
|1957-06-13 00:00:00-07
|1957-06-13 00:00:00-07
-(64 rows)
+(63 rows)
QUERY: SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
eight|european_iso
|01/01/1997 17:32:01.00 PST
|28/02/1997 17:32:01.00 PST
|01/03/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/2001 17:32:01.00 PST
|13/06/1957 00:00:00.00 PDT
|13/06/1957 00:00:00.00 PDT
-(64 rows)
+(63 rows)
QUERY: SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
eight|european_sql