Commit 7f1d68a4 authored by Alvaro Herrera's avatar Alvaro Herrera

Fix the timestamptz test problem, by moving the tests that use the

timestamp_tbl table into the timestamp test.  Also, restore a test that
used to exist as a valid test in the timestamptz test.
parent 89b18bdd
......@@ -1675,4 +1675,209 @@ SELECT '' AS to_timestamp_21, to_timestamp('2005364', 'IYYYIDDD');
| Sun Jan 01 00:00:00 2006 PST
(1 row)
SELECT '' AS "54", d1 as "timestamp",
date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
date_part( 'dow', d1) AS dow
FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
54 | timestamp | isoyear | week | dow
----+-----------------------------+---------+------+-----
| Thu Jan 01 00:00:00 1970 | 1970 | 1 | 4
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:02 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01.40 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01.50 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01.60 1997 | 1997 | 7 | 1
| Thu Jan 02 00:00:00 1997 | 1997 | 1 | 4
| Thu Jan 02 03:04:05 1997 | 1997 | 1 | 4
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Tue Jun 10 17:32:01 1997 | 1997 | 24 | 2
| Sat Sep 22 18:19:20 2001 | 2001 | 38 | 6
| Wed Mar 15 08:14:01 2000 | 2000 | 11 | 3
| Wed Mar 15 13:14:02 2000 | 2000 | 11 | 3
| Wed Mar 15 12:14:03 2000 | 2000 | 11 | 3
| Wed Mar 15 03:14:04 2000 | 2000 | 11 | 3
| Wed Mar 15 02:14:05 2000 | 2000 | 11 | 3
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:00 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Tue Jun 10 18:32:01 1997 | 1997 | 24 | 2
| Mon Feb 10 17:32:01 1997 | 1997 | 7 | 1
| Tue Feb 11 17:32:01 1997 | 1997 | 7 | 2
| Wed Feb 12 17:32:01 1997 | 1997 | 7 | 3
| Thu Feb 13 17:32:01 1997 | 1997 | 7 | 4
| Fri Feb 14 17:32:01 1997 | 1997 | 7 | 5
| Sat Feb 15 17:32:01 1997 | 1997 | 7 | 6
| Sun Feb 16 17:32:01 1997 | 1997 | 7 | 0
| Sun Feb 16 17:32:01 1997 | 1997 | 7 | 0
| Wed Feb 28 17:32:01 1996 | 1996 | 9 | 3
| Thu Feb 29 17:32:01 1996 | 1996 | 9 | 4
| Fri Mar 01 17:32:01 1996 | 1996 | 9 | 5
| Mon Dec 30 17:32:01 1996 | 1997 | 1 | 1
| Tue Dec 31 17:32:01 1996 | 1997 | 1 | 2
| Wed Jan 01 17:32:01 1997 | 1997 | 1 | 3
| Fri Feb 28 17:32:01 1997 | 1997 | 9 | 5
| Sat Mar 01 17:32:01 1997 | 1997 | 9 | 6
| Tue Dec 30 17:32:01 1997 | 1998 | 1 | 2
| Wed Dec 31 17:32:01 1997 | 1998 | 1 | 3
| Fri Dec 31 17:32:01 1999 | 1999 | 52 | 5
| Sat Jan 01 17:32:01 2000 | 1999 | 52 | 6
| Sun Dec 31 17:32:01 2000 | 2000 | 52 | 0
| Mon Jan 01 17:32:01 2001 | 2001 | 1 | 1
(55 rows)
SELECT '' AS to_char_10, to_char(d1, 'IYYY IYY IY I IW IDDD ID')
FROM TIMESTAMP_TBL;
to_char_10 | to_char
------------+------------------------
|
|
| 1970 970 70 0 01 004 4
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 01 004 4
| 1997 997 97 7 01 004 4
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 24 163 2
| 2001 001 01 1 38 265 6
| 2000 000 00 0 11 073 3
| 2000 000 00 0 11 073 3
| 2000 000 00 0 11 073 3
| 2000 000 00 0 11 073 3
| 2000 000 00 0 11 073 3
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 043 1
| 1997 997 97 7 24 163 2
| 1997 997 97 7 07 043 1
| 1997 997 97 7 07 044 2
| 1997 997 97 7 07 045 3
| 1997 997 97 7 07 046 4
| 1997 997 97 7 07 047 5
| 1997 997 97 7 07 048 6
| 1997 997 97 7 07 049 7
| 0097 097 97 7 07 044 2
| 0097 097 97 7 07 048 6
| 0597 597 97 7 07 046 4
| 1097 097 97 7 07 044 2
| 1697 697 97 7 07 048 6
| 1797 797 97 7 07 046 4
| 1897 897 97 7 07 044 2
| 1997 997 97 7 07 049 7
| 2097 097 97 7 07 048 6
| 1996 996 96 6 09 059 3
| 1996 996 96 6 09 060 4
| 1996 996 96 6 09 061 5
| 1997 997 97 7 01 001 1
| 1997 997 97 7 01 002 2
| 1997 997 97 7 01 003 3
| 1997 997 97 7 09 061 5
| 1997 997 97 7 09 062 6
| 1998 998 98 8 01 002 2
| 1998 998 98 8 01 003 3
| 1999 999 99 9 52 362 5
| 1999 999 99 9 52 363 6
| 2000 000 00 0 52 364 7
| 2001 001 01 1 01 001 1
(65 rows)
SELECT '' AS to_char_11, to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID')
FROM TIMESTAMP_TBL;
to_char_11 | to_char
------------+------------------------
|
|
| 1970 970 70 0 1 4 4
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 1 4 4
| 1997 997 97 7 1 4 4
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 24 163 2
| 2001 001 01 1 38 265 6
| 2000 000 00 0 11 73 3
| 2000 000 00 0 11 73 3
| 2000 000 00 0 11 73 3
| 2000 000 00 0 11 73 3
| 2000 000 00 0 11 73 3
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 43 1
| 1997 997 97 7 24 163 2
| 1997 997 97 7 7 43 1
| 1997 997 97 7 7 44 2
| 1997 997 97 7 7 45 3
| 1997 997 97 7 7 46 4
| 1997 997 97 7 7 47 5
| 1997 997 97 7 7 48 6
| 1997 997 97 7 7 49 7
| 97 097 97 7 7 44 2
| 97 097 97 7 7 48 6
| 597 597 97 7 7 46 4
| 1097 097 97 7 7 44 2
| 1697 697 97 7 7 48 6
| 1797 797 97 7 7 46 4
| 1897 897 97 7 7 44 2
| 1997 997 97 7 7 49 7
| 2097 097 97 7 7 48 6
| 1996 996 96 6 9 59 3
| 1996 996 96 6 9 60 4
| 1996 996 96 6 9 61 5
| 1997 997 97 7 1 1 1
| 1997 997 97 7 1 2 2
| 1997 997 97 7 1 3 3
| 1997 997 97 7 9 61 5
| 1997 997 97 7 9 62 6
| 1998 998 98 8 1 2 2
| 1998 998 98 8 1 3 3
| 1999 999 99 9 52 362 5
| 1999 999 99 9 52 363 6
| 2000 000 00 0 52 364 7
| 2001 001 01 1 1 1 1
(65 rows)
SET DateStyle TO DEFAULT;
This diff is collapsed.
......@@ -255,4 +255,15 @@ SELECT '' AS to_timestamp_20, to_timestamp('5527', 'IIWID');
SELECT '' AS to_timestamp_21, to_timestamp('2005364', 'IYYYIDDD');
SELECT '' AS "54", d1 as "timestamp",
date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
date_part( 'dow', d1) AS dow
FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
SELECT '' AS to_char_10, to_char(d1, 'IYYY IYY IY I IW IDDD ID')
FROM TIMESTAMP_TBL;
SELECT '' AS to_char_11, to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID')
FROM TIMESTAMP_TBL;
SET DateStyle TO DEFAULT;
......@@ -169,11 +169,6 @@ SELECT '' AS "54", d1 as timestamptz,
date_part( 'usec', d1) AS usec
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
SELECT '' AS "54", d1 as "timestamp",
date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
date_part( 'dow', d1) AS dow
FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
-- TO_CHAR()
SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
FROM TIMESTAMPTZ_TBL;
......@@ -202,11 +197,8 @@ SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm')
FROM TIMESTAMPTZ_TBL;
SELECT '' AS to_char_10, to_char(d1, 'IYYY IYY IY I IW IDDD ID')
FROM TIMESTAMP_TBL;
SELECT '' AS to_char_11, to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID')
FROM TIMESTAMP_TBL;
SELECT '' AS to_char_10, to_char(d1, 'YYYY WW IYYY IYY IY I IW')
FROM TIMESTAMPTZ_TBL;
-- TO_TIMESTAMP()
SELECT '' AS to_timestamp_1, to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment