diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/abstime.out | 136 | ||||
-rw-r--r-- | src/test/regress/expected/alter_table.out | 30 | ||||
-rw-r--r-- | src/test/regress/expected/horology.out | 210 | ||||
-rw-r--r-- | src/test/regress/expected/opr_sanity.out | 34 | ||||
-rw-r--r-- | src/test/regress/expected/reltime.out | 109 | ||||
-rw-r--r-- | src/test/regress/expected/rules.out | 2 | ||||
-rw-r--r-- | src/test/regress/expected/sanity_check.out | 3 | ||||
-rw-r--r-- | src/test/regress/expected/tinterval.out | 172 | ||||
-rw-r--r-- | src/test/regress/parallel_schedule | 4 | ||||
-rw-r--r-- | src/test/regress/serial_schedule | 3 | ||||
-rw-r--r-- | src/test/regress/sql/abstime.sql | 67 | ||||
-rw-r--r-- | src/test/regress/sql/alter_table.sql | 24 | ||||
-rw-r--r-- | src/test/regress/sql/horology.sql | 62 | ||||
-rw-r--r-- | src/test/regress/sql/opr_sanity.sql | 2 | ||||
-rw-r--r-- | src/test/regress/sql/reltime.sql | 50 | ||||
-rw-r--r-- | src/test/regress/sql/tinterval.sql | 97 |
16 files changed, 22 insertions, 983 deletions
diff --git a/src/test/regress/expected/abstime.out b/src/test/regress/expected/abstime.out deleted file mode 100644 index ed48f642ab3..00000000000 --- a/src/test/regress/expected/abstime.out +++ /dev/null @@ -1,136 +0,0 @@ --- --- ABSTIME --- testing built-in time type abstime --- uses reltime and tinterval --- --- --- timezones may vary based not only on location but the operating --- system. the main correctness issue is that the OS may not get --- daylight savings time right for times prior to Unix epoch (jan 1 1970). --- -CREATE TABLE ABSTIME_TBL (f1 abstime); -BEGIN; -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now'); -SELECT count(*) AS two FROM ABSTIME_TBL WHERE f1 = 'now' ; - two ------ - 2 -(1 row) - -END; -DELETE FROM ABSTIME_TBL; -INSERT INTO ABSTIME_TBL (f1) VALUES ('Jan 14, 1973 03:14:21'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'Mon May 1 00:30:30 1995'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'epoch'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'infinity'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime '-infinity'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'May 10, 1947 23:59:12'); --- what happens if we specify slightly misformatted abstime? -INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00'); -ERROR: date/time field value out of range: "Feb 35, 1946 10:00:00" -LINE 1: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00'... - ^ -HINT: Perhaps you need a different "datestyle" setting. -INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10'); -ERROR: date/time field value out of range: "Feb 28, 1984 25:08:10" -LINE 1: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10'... - ^ --- badly formatted abstimes: these should result in invalid abstimes -INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format'); -ERROR: invalid input syntax for type abstime: "bad date format" -LINE 1: INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format'); - ^ -INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843'); --- test abstime operators -SELECT '' AS eight, * FROM ABSTIME_TBL; - eight | f1 --------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Mon May 01 00:30:30 1995 PDT - | Wed Dec 31 16:00:00 1969 PST - | infinity - | -infinity - | Sat May 10 23:59:12 1947 PST - | invalid -(7 rows) - -SELECT '' AS six, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 < abstime 'Jun 30, 2001'; - six | f1 ------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Mon May 01 00:30:30 1995 PDT - | Wed Dec 31 16:00:00 1969 PST - | -infinity - | Sat May 10 23:59:12 1947 PST -(5 rows) - -SELECT '' AS six, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 > abstime '-infinity'; - six | f1 ------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Mon May 01 00:30:30 1995 PDT - | Wed Dec 31 16:00:00 1969 PST - | infinity - | Sat May 10 23:59:12 1947 PST - | invalid -(6 rows) - -SELECT '' AS six, * FROM ABSTIME_TBL - WHERE abstime 'May 10, 1947 23:59:12' <> ABSTIME_TBL.f1; - six | f1 ------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Mon May 01 00:30:30 1995 PDT - | Wed Dec 31 16:00:00 1969 PST - | infinity - | -infinity - | invalid -(6 rows) - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE abstime 'epoch' >= ABSTIME_TBL.f1; - three | f1 --------+------------------------------ - | Wed Dec 31 16:00:00 1969 PST - | -infinity - | Sat May 10 23:59:12 1947 PST -(3 rows) - -SELECT '' AS four, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 <= abstime 'Jan 14, 1973 03:14:21'; - four | f1 -------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Wed Dec 31 16:00:00 1969 PST - | -infinity - | Sat May 10 23:59:12 1947 PST -(4 rows) - -SELECT '' AS four, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 <?> - tinterval '["Apr 1 1950 00:00:00" "Dec 30 1999 23:00:00"]'; - four | f1 -------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Mon May 01 00:30:30 1995 PDT - | Wed Dec 31 16:00:00 1969 PST -(3 rows) - -SELECT '' AS four, f1 AS abstime, - date_part('year', f1) AS year, date_part('month', f1) AS month, - date_part('day',f1) AS day, date_part('hour', f1) AS hour, - date_part('minute', f1) AS minute, date_part('second', f1) AS second - FROM ABSTIME_TBL - WHERE isfinite(f1) - ORDER BY abstime; - four | abstime | year | month | day | hour | minute | second -------+------------------------------+------+-------+-----+------+--------+-------- - | Sat May 10 23:59:12 1947 PST | 1947 | 5 | 10 | 23 | 59 | 12 - | Wed Dec 31 16:00:00 1969 PST | 1969 | 12 | 31 | 16 | 0 | 0 - | Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21 - | Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30 -(4 rows) - diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index be0b54cc528..68cd3e5676d 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -23,9 +23,7 @@ ALTER TABLE attmp ADD COLUMN d float8; ALTER TABLE attmp ADD COLUMN e float4; ALTER TABLE attmp ADD COLUMN f int2; ALTER TABLE attmp ADD COLUMN g polygon; -ALTER TABLE attmp ADD COLUMN h abstime; ALTER TABLE attmp ADD COLUMN i char; -ALTER TABLE attmp ADD COLUMN j abstime[]; ALTER TABLE attmp ADD COLUMN k int4; ALTER TABLE attmp ADD COLUMN l tid; ALTER TABLE attmp ADD COLUMN m xid; @@ -36,24 +34,23 @@ ALTER TABLE attmp ADD COLUMN q point; ALTER TABLE attmp ADD COLUMN r lseg; ALTER TABLE attmp ADD COLUMN s path; ALTER TABLE attmp ADD COLUMN t box; -ALTER TABLE attmp ADD COLUMN u tinterval; ALTER TABLE attmp ADD COLUMN v timestamp; ALTER TABLE attmp ADD COLUMN w interval; ALTER TABLE attmp ADD COLUMN x float8[]; ALTER TABLE attmp ADD COLUMN y float4[]; ALTER TABLE attmp ADD COLUMN z int2[]; -INSERT INTO attmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, +INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t, v, w, x, y, z) VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', - 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', + 'c', 314159, '(1,1)', '512', '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', - '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["epoch" "infinity"]', + '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', 'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); SELECT * FROM attmp; - initial | a | b | c | d | e | f | g | h | i | j | k | l | m | n | p | q | r | s | t | u | v | w | x | y | z ----------+---+------+------+-----+-----+---+-----------------------+------------------------------+---+------------------------------------------------------------------------------------------------+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+---------------------------------------------+--------------------------+------------------+-----------+-----------+----------- - | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | Mon May 01 00:30:30 1995 PDT | c | {"Mon May 01 00:30:30 1995 PDT","Mon Aug 24 14:43:07 1992 PDT","Wed Dec 31 16:00:00 1969 PST"} | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | ["Wed Dec 31 16:00:00 1969 PST" "infinity"] | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4} + initial | a | b | c | d | e | f | g | i | k | l | m | n | p | q | r | s | t | v | w | x | y | z +---------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+----------- + | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4} (1 row) DROP TABLE attmp; @@ -68,9 +65,7 @@ ALTER TABLE attmp ADD COLUMN d float8; ALTER TABLE attmp ADD COLUMN e float4; ALTER TABLE attmp ADD COLUMN f int2; ALTER TABLE attmp ADD COLUMN g polygon; -ALTER TABLE attmp ADD COLUMN h abstime; ALTER TABLE attmp ADD COLUMN i char; -ALTER TABLE attmp ADD COLUMN j abstime[]; ALTER TABLE attmp ADD COLUMN k int4; ALTER TABLE attmp ADD COLUMN l tid; ALTER TABLE attmp ADD COLUMN m xid; @@ -81,24 +76,23 @@ ALTER TABLE attmp ADD COLUMN q point; ALTER TABLE attmp ADD COLUMN r lseg; ALTER TABLE attmp ADD COLUMN s path; ALTER TABLE attmp ADD COLUMN t box; -ALTER TABLE attmp ADD COLUMN u tinterval; ALTER TABLE attmp ADD COLUMN v timestamp; ALTER TABLE attmp ADD COLUMN w interval; ALTER TABLE attmp ADD COLUMN x float8[]; ALTER TABLE attmp ADD COLUMN y float4[]; ALTER TABLE attmp ADD COLUMN z int2[]; -INSERT INTO attmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, +INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t, v, w, x, y, z) VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', - 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', + 'c', 314159, '(1,1)', '512', '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', - '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["epoch" "infinity"]', + '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', 'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); SELECT * FROM attmp; - initial | a | b | c | d | e | f | g | h | i | j | k | l | m | n | p | q | r | s | t | u | v | w | x | y | z ----------+---+------+------+-----+-----+---+-----------------------+------------------------------+---+------------------------------------------------------------------------------------------------+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+---------------------------------------------+--------------------------+------------------+-----------+-----------+----------- - | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | Mon May 01 00:30:30 1995 PDT | c | {"Mon May 01 00:30:30 1995 PDT","Mon Aug 24 14:43:07 1992 PDT","Wed Dec 31 16:00:00 1969 PST"} | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | ["Wed Dec 31 16:00:00 1969 PST" "infinity"] | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4} + initial | a | b | c | d | e | f | g | i | k | l | m | n | p | q | r | s | t | v | w | x | y | z +---------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+----------- + | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 | magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4} (1 row) CREATE INDEX attmp_idx ON attmp (a, (d + e), b); diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out index b00ab0f142c..b2b45773339 100644 --- a/src/test/regress/expected/horology.out +++ b/src/test/regress/expected/horology.out @@ -2047,70 +2047,6 @@ SELECT '' AS "226", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS d (256 rows) -- --- abstime, reltime arithmetic --- -SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime - FROM ABSTIME_TBL, RELTIME_TBL - WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1) < abstime 'Jan 14 14:00:00 1971' - ORDER BY abstime, reltime; - ten | abstime | reltime ------+------------------------------+--------------- - | Sat May 10 23:59:12 1947 PST | @ 14 secs ago - | Sat May 10 23:59:12 1947 PST | @ 1 min - | Sat May 10 23:59:12 1947 PST | @ 5 hours - | Sat May 10 23:59:12 1947 PST | @ 10 days - | Sat May 10 23:59:12 1947 PST | @ 3 mons - | Wed Dec 31 16:00:00 1969 PST | @ 14 secs ago - | Wed Dec 31 16:00:00 1969 PST | @ 1 min - | Wed Dec 31 16:00:00 1969 PST | @ 5 hours - | Wed Dec 31 16:00:00 1969 PST | @ 10 days - | Wed Dec 31 16:00:00 1969 PST | @ 3 mons -(10 rows) - --- these four queries should return the same answer --- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and --- therefore, should not show up in the results. -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years - < abstime 'Jan 14 14:00:00 1977'; - three | f1 --------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Wed Dec 31 16:00:00 1969 PST - | Sat May 10 23:59:12 1947 PST -(3 rows) - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years - < abstime 'Jan 14 14:00:00 1971'; - three | f1 --------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Wed Dec 31 16:00:00 1969 PST - | Sat May 10 23:59:12 1947 PST -(3 rows) - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years - < abstime 'Jan 14 14:00:00 1971'; - three | f1 --------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Wed Dec 31 16:00:00 1969 PST - | Sat May 10 23:59:12 1947 PST -(3 rows) - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years - < abstime 'Jan 14 14:00:00 1977'; - three | f1 --------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Wed Dec 31 16:00:00 1969 PST - | Sat May 10 23:59:12 1947 PST -(3 rows) - --- -- Conversions -- SELECT '' AS "16", f1 AS "timestamp", date(f1) AS date @@ -2137,80 +2073,6 @@ SELECT '' AS "16", f1 AS "timestamp", date(f1) AS date | Sat Sep 22 18:19:20 2001 PDT | 09-22-2001 (16 rows) -SELECT '' AS "16", f1 AS "timestamp", abstime(f1) AS abstime - FROM TEMP_TIMESTAMP - ORDER BY abstime; - 16 | timestamp | abstime -----+------------------------------+------------------------------ - | Thu Jan 01 00:00:00 1970 PST | Thu Jan 01 00:00:00 1970 PST - | Wed Feb 28 17:32:01 1996 PST | Wed Feb 28 17:32:01 1996 PST - | Thu Feb 29 17:32:01 1996 PST | Thu Feb 29 17:32:01 1996 PST - | Fri Mar 01 17:32:01 1996 PST | Fri Mar 01 17:32:01 1996 PST - | Mon Dec 30 17:32:01 1996 PST | Mon Dec 30 17:32:01 1996 PST - | Tue Dec 31 17:32:01 1996 PST | Tue Dec 31 17:32:01 1996 PST - | Fri Dec 31 17:32:01 1999 PST | Fri Dec 31 17:32:01 1999 PST - | Sat Jan 01 17:32:01 2000 PST | Sat Jan 01 17:32:01 2000 PST - | Wed Mar 15 02:14:05 2000 PST | Wed Mar 15 02:14:05 2000 PST - | Wed Mar 15 03:14:04 2000 PST | Wed Mar 15 03:14:04 2000 PST - | Wed Mar 15 08:14:01 2000 PST | Wed Mar 15 08:14:01 2000 PST - | Wed Mar 15 12:14:03 2000 PST | Wed Mar 15 12:14:03 2000 PST - | Wed Mar 15 13:14:02 2000 PST | Wed Mar 15 13:14:02 2000 PST - | Sun Dec 31 17:32:01 2000 PST | Sun Dec 31 17:32:01 2000 PST - | Mon Jan 01 17:32:01 2001 PST | Mon Jan 01 17:32:01 2001 PST - | Sat Sep 22 18:19:20 2001 PDT | Sat Sep 22 18:19:20 2001 PDT -(16 rows) - -SELECT '' AS four, f1 AS abstime, date(f1) AS date - FROM ABSTIME_TBL - WHERE isfinite(f1) AND f1 <> abstime 'now' - ORDER BY date, abstime; - four | abstime | date -------+------------------------------+------------ - | Sat May 10 23:59:12 1947 PST | 05-10-1947 - | Wed Dec 31 16:00:00 1969 PST | 12-31-1969 - | Sun Jan 14 03:14:21 1973 PST | 01-14-1973 - | Mon May 01 00:30:30 1995 PDT | 05-01-1995 -(4 rows) - -SELECT '' AS two, d1 AS "timestamp", abstime(d1) AS abstime - FROM TIMESTAMP_TBL WHERE NOT isfinite(d1); - two | timestamp | abstime ------+-----------+----------- - | -infinity | -infinity - | infinity | infinity -(2 rows) - -SELECT '' AS three, f1 as abstime, cast(f1 as timestamp) AS "timestamp" - FROM ABSTIME_TBL WHERE NOT isfinite(f1); -ERROR: cannot convert abstime "invalid" to timestamp -SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime - FROM INTERVAL_TBL; - ten | interval | reltime ------+-------------------------------+------------------------------- - | @ 1 min | @ 1 min - | @ 5 hours | @ 5 hours - | @ 10 days | @ 10 days - | @ 34 years | @ 34 years - | @ 3 mons | @ 3 mons - | @ 14 secs ago | @ 14 secs ago - | @ 1 day 2 hours 3 mins 4 secs | @ 1 day 2 hours 3 mins 4 secs - | @ 6 years | @ 6 years - | @ 5 mons | @ 5 mons - | @ 5 mons 12 hours | @ 5 mons 12 hours -(10 rows) - -SELECT '' AS six, f1 as reltime, CAST(f1 AS interval) AS interval - FROM RELTIME_TBL; - six | reltime | interval ------+---------------+--------------- - | @ 1 min | @ 1 min - | @ 5 hours | @ 5 hours - | @ 10 days | @ 10 days - | @ 34 years | @ 34 years - | @ 3 mons | @ 3 mons - | @ 14 secs ago | @ 14 secs ago -(6 rows) - DROP TABLE TEMP_TIMESTAMP; -- -- Formats @@ -2292,18 +2154,6 @@ SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL; | Mon Jan 01 17:32:01 2001 (65 rows) -SELECT '' AS seven, f1 AS us_postgres FROM ABSTIME_TBL; - seven | us_postgres --------+------------------------------ - | Sun Jan 14 03:14:21 1973 PST - | Mon May 01 00:30:30 1995 PDT - | Wed Dec 31 16:00:00 1969 PST - | infinity - | -infinity - | Sat May 10 23:59:12 1947 PST - | invalid -(7 rows) - SET DateStyle TO 'US,ISO'; SELECT '' AS "64", d1 AS us_iso FROM TIMESTAMP_TBL; 64 | us_iso @@ -2375,18 +2225,6 @@ SELECT '' AS "64", d1 AS us_iso FROM TIMESTAMP_TBL; | 2001-01-01 17:32:01 (65 rows) -SELECT '' AS seven, f1 AS us_iso FROM ABSTIME_TBL; - seven | us_iso --------+------------------------ - | 1973-01-14 03:14:21-08 - | 1995-05-01 00:30:30-07 - | 1969-12-31 16:00:00-08 - | infinity - | -infinity - | 1947-05-10 23:59:12-08 - | invalid -(7 rows) - SET DateStyle TO 'US,SQL'; SHOW DateStyle; DateStyle @@ -2464,18 +2302,6 @@ SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL; | 01/01/2001 17:32:01 (65 rows) -SELECT '' AS seven, f1 AS us_sql FROM ABSTIME_TBL; - seven | us_sql --------+------------------------- - | 01/14/1973 03:14:21 PST - | 05/01/1995 00:30:30 PDT - | 12/31/1969 16:00:00 PST - | infinity - | -infinity - | 05/10/1947 23:59:12 PST - | invalid -(7 rows) - SET DateStyle TO 'European,Postgres'; SHOW DateStyle; DateStyle @@ -2561,18 +2387,6 @@ SELECT '' AS "65", d1 AS european_postgres FROM TIMESTAMP_TBL; | Thu 13 Jun 00:00:00 1957 (66 rows) -SELECT '' AS seven, f1 AS european_postgres FROM ABSTIME_TBL; - seven | european_postgres --------+------------------------------ - | Sun 14 Jan 03:14:21 1973 PST - | Mon 01 May 00:30:30 1995 PDT - | Wed 31 Dec 16:00:00 1969 PST - | infinity - | -infinity - | Sat 10 May 23:59:12 1947 PST - | invalid -(7 rows) - SET DateStyle TO 'European,ISO'; SHOW DateStyle; DateStyle @@ -2651,18 +2465,6 @@ SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL; | 1957-06-13 00:00:00 (66 rows) -SELECT '' AS seven, f1 AS european_iso FROM ABSTIME_TBL; - seven | european_iso --------+------------------------ - | 1973-01-14 03:14:21-08 - | 1995-05-01 00:30:30-07 - | 1969-12-31 16:00:00-08 - | infinity - | -infinity - | 1947-05-10 23:59:12-08 - | invalid -(7 rows) - SET DateStyle TO 'European,SQL'; SHOW DateStyle; DateStyle @@ -2741,18 +2543,6 @@ SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL; | 13/06/1957 00:00:00 (66 rows) -SELECT '' AS seven, f1 AS european_sql FROM ABSTIME_TBL; - seven | european_sql --------+------------------------- - | 14/01/1973 03:14:21 PST - | 01/05/1995 00:30:30 PDT - | 31/12/1969 16:00:00 PST - | infinity - | -infinity - | 10/05/1947 23:59:12 PST - | invalid -(7 rows) - RESET DateStyle; -- -- to_timestamp() diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out index 7bcc03b9ada..11e6cd85714 100644 --- a/src/test/regress/expected/opr_sanity.out +++ b/src/test/regress/expected/opr_sanity.out @@ -521,24 +521,6 @@ int24ge(smallint,integer) int42ge(integer,smallint) oideq(oid,oid) oidne(oid,oid) -abstimeeq(abstime,abstime) -abstimene(abstime,abstime) -abstimelt(abstime,abstime) -abstimegt(abstime,abstime) -abstimele(abstime,abstime) -abstimege(abstime,abstime) -reltimeeq(reltime,reltime) -reltimene(reltime,reltime) -reltimelt(reltime,reltime) -reltimegt(reltime,reltime) -reltimele(reltime,reltime) -reltimege(reltime,reltime) -tintervalleneq(tinterval,reltime) -tintervallenne(tinterval,reltime) -tintervallenlt(tinterval,reltime) -tintervallengt(tinterval,reltime) -tintervallenle(tinterval,reltime) -tintervallenge(tinterval,reltime) float4eq(real,real) float4ne(real,real) float4lt(real,real) @@ -568,12 +550,9 @@ btint4cmp(integer,integer) btfloat4cmp(real,real) btfloat8cmp(double precision,double precision) btoidcmp(oid,oid) -btabstimecmp(abstime,abstime) btcharcmp("char","char") btnamecmp(name,name) cash_cmp(money,money) -btreltimecmp(reltime,reltime) -bttintervalcmp(tinterval,tinterval) int8eq(bigint,bigint) int8ne(bigint,bigint) int8lt(bigint,bigint) @@ -593,12 +572,6 @@ namege(name,name) namene(name,name) oidlt(oid,oid) oidle(oid,oid) -tintervaleq(tinterval,tinterval) -tintervalne(tinterval,tinterval) -tintervallt(tinterval,tinterval) -tintervalgt(tinterval,tinterval) -tintervalle(tinterval,tinterval) -tintervalge(tinterval,tinterval) macaddr_eq(macaddr,macaddr) macaddr_lt(macaddr,macaddr) macaddr_le(macaddr,macaddr) @@ -1074,9 +1047,6 @@ ORDER BY 1, 2; !~* | ~* !~~ | ~~ !~~* | ~~* - #< | #>= - #<= | #> - #<> | #= *< | *>= *<= | *> *<> | *= @@ -1086,7 +1056,7 @@ ORDER BY 1, 2; <> | ~= ~<=~ | ~>~ ~<~ | ~>=~ -(16 rows) +(13 rows) -- A mergejoinable or hashjoinable operator must be binary, must return -- boolean, and must have a commutator (itself, unless it's a cross-type @@ -1354,7 +1324,6 @@ WHERE a.aggfnoid = p.oid AND -- Cross-check transfn against its entry in pg_proc. -- NOTE: use physically_coercible here, not binary_coercible, because --- max and min on abstime are implemented using int4larger/int4smaller. SELECT a.aggfnoid::oid, p.proname, ptr.oid, ptr.proname FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS ptr WHERE a.aggfnoid = p.oid AND @@ -1535,7 +1504,6 @@ WHERE a.aggfnoid = p.oid AND -- Check that all combine functions have signature -- combine(transtype, transtype) returns transtype -- NOTE: use physically_coercible here, not binary_coercible, because --- max and min on abstime are implemented using int4larger/int4smaller. SELECT a.aggfnoid, p.proname FROM pg_aggregate as a, pg_proc as p WHERE a.aggcombinefn = p.oid AND diff --git a/src/test/regress/expected/reltime.out b/src/test/regress/expected/reltime.out deleted file mode 100644 index 14fdc6aeec5..00000000000 --- a/src/test/regress/expected/reltime.out +++ /dev/null @@ -1,109 +0,0 @@ --- --- RELTIME --- -CREATE TABLE RELTIME_TBL (f1 reltime); -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 1 minute'); -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 5 hour'); -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 10 day'); -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 34 year'); -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 3 months'); -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 14 seconds ago'); --- badly formatted reltimes -INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime'); -ERROR: invalid input syntax for type reltime: "badly formatted reltime" -LINE 1: INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltim... - ^ -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago'); -ERROR: invalid input syntax for type reltime: "@ 30 eons ago" -LINE 1: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago'); - ^ --- test reltime operators -SELECT '' AS six, * FROM RELTIME_TBL; - six | f1 ------+--------------- - | @ 1 min - | @ 5 hours - | @ 10 days - | @ 34 years - | @ 3 mons - | @ 14 secs ago -(6 rows) - -SELECT '' AS five, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 <> reltime '@ 10 days'; - five | f1 -------+--------------- - | @ 1 min - | @ 5 hours - | @ 34 years - | @ 3 mons - | @ 14 secs ago -(5 rows) - -SELECT '' AS three, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 <= reltime '@ 5 hours'; - three | f1 --------+--------------- - | @ 1 min - | @ 5 hours - | @ 14 secs ago -(3 rows) - -SELECT '' AS three, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 < reltime '@ 1 day'; - three | f1 --------+--------------- - | @ 1 min - | @ 5 hours - | @ 14 secs ago -(3 rows) - -SELECT '' AS one, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 = reltime '@ 34 years'; - one | f1 ------+------------ - | @ 34 years -(1 row) - -SELECT '' AS two, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 >= reltime '@ 1 month'; - two | f1 ------+------------ - | @ 34 years - | @ 3 mons -(2 rows) - -SELECT '' AS five, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 > reltime '@ 3 seconds ago'; - five | f1 -------+------------ - | @ 1 min - | @ 5 hours - | @ 10 days - | @ 34 years - | @ 3 mons -(5 rows) - -SELECT '' AS fifteen, r1.*, r2.* - FROM RELTIME_TBL r1, RELTIME_TBL r2 - WHERE r1.f1 > r2.f1 - ORDER BY r1.f1, r2.f1; - fifteen | f1 | f1 ----------+------------+--------------- - | @ 1 min | @ 14 secs ago - | @ 5 hours | @ 14 secs ago - | @ 5 hours | @ 1 min - | @ 10 days | @ 14 secs ago - | @ 10 days | @ 1 min - | @ 10 days | @ 5 hours - | @ 3 mons | @ 14 secs ago - | @ 3 mons | @ 1 min - | @ 3 mons | @ 5 hours - | @ 3 mons | @ 10 days - | @ 34 years | @ 14 secs ago - | @ 34 years | @ 1 min - | @ 34 years | @ 5 hours - | @ 34 years | @ 10 days - | @ 34 years | @ 3 mons -(15 rows) - diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out index 078129f251b..735dd37acff 100644 --- a/src/test/regress/expected/rules.out +++ b/src/test/regress/expected/rules.out @@ -1706,7 +1706,7 @@ pg_shadow| SELECT pg_authid.rolname AS usename, pg_authid.rolreplication AS userepl, pg_authid.rolbypassrls AS usebypassrls, pg_authid.rolpassword AS passwd, - (pg_authid.rolvaliduntil)::abstime AS valuntil, + pg_authid.rolvaliduntil AS valuntil, s.setconfig AS useconfig FROM (pg_authid LEFT JOIN pg_db_role_setting s ON (((pg_authid.oid = s.setrole) AND (s.setdatabase = (0)::oid)))) diff --git a/src/test/regress/expected/sanity_check.out b/src/test/regress/expected/sanity_check.out index 48e0508a96b..9c7a60c092d 100644 --- a/src/test/regress/expected/sanity_check.out +++ b/src/test/regress/expected/sanity_check.out @@ -13,7 +13,6 @@ SELECT relname, relhasindex ORDER BY relname; a|f a_star|f -abstime_tbl|f aggtest|f array_index_op_test|t array_op_test|f @@ -174,7 +173,6 @@ quad_poly_tbl_ord_seq2|f radix_text_tbl|t ramp|f real_city|f -reltime_tbl|f road|t shighway|t slow_emp4000|f @@ -205,7 +203,6 @@ time_tbl|f timestamp_tbl|f timestamptz_tbl|f timetz_tbl|f -tinterval_tbl|f varchar_tbl|f -- restore normal output mode \a\t diff --git a/src/test/regress/expected/tinterval.out b/src/test/regress/expected/tinterval.out deleted file mode 100644 index a0189729fc3..00000000000 --- a/src/test/regress/expected/tinterval.out +++ /dev/null @@ -1,172 +0,0 @@ --- --- TINTERVAL --- -CREATE TABLE TINTERVAL_TBL (f1 tinterval); --- Should accept any abstime, --- so do not bother with extensive testing of values -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["-infinity" "infinity"]'); -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]'); -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]'); -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["epoch" "Mon May 1 00:30:30 1995"]'); -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["Feb 15 1990 12:15:03" "2001-09-23 11:12:13"]'); --- badly formatted tintervals -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["bad time specifications" ""]'); -ERROR: invalid input syntax for type abstime: "bad time specifications" -LINE 2: VALUES ('["bad time specifications" ""]'); - ^ -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["" "infinity"]'); -ERROR: invalid input syntax for type abstime: "" -LINE 2: VALUES ('["" "infinity"]'); - ^ --- test tinterval operators -SELECT '' AS five, * FROM TINTERVAL_TBL; - five | f1 -------+----------------------------------------------------------------- - | ["-infinity" "infinity"] - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] -(5 rows) - --- length == -SELECT '' AS one, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #= '@ 1 months'; - one | f1 ------+----------------------------------------------------------------- - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] -(1 row) - --- length <> -SELECT '' AS three, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #<> '@ 1 months'; - three | f1 --------+----------------------------------------------------------------- - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] -(3 rows) - --- length < -SELECT '' AS zero, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #< '@ 1 month'; - zero | f1 -------+---- -(0 rows) - --- length <= -SELECT '' AS one, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #<= '@ 1 month'; - one | f1 ------+----------------------------------------------------------------- - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] -(1 row) - --- length > -SELECT '' AS three, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #> '@ 1 year'; - three | f1 --------+----------------------------------------------------------------- - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] -(3 rows) - --- length >= -SELECT '' AS three, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #>= '@ 3 years'; - three | f1 --------+----------------------------------------------------------------- - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] -(3 rows) - --- overlaps -SELECT '' AS three, t1.* - FROM TINTERVAL_TBL t1 - WHERE t1.f1 && - tinterval '["Aug 15 14:23:19 1983" "Sep 16 14:23:19 1983"]'; - three | f1 --------+----------------------------------------------------------------- - | ["-infinity" "infinity"] - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] -(3 rows) - -SELECT '' AS five, t1.f1, t2.f1 - FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2 - WHERE t1.f1 && t2.f1 and - t1.f1 = t2.f1 - ORDER BY t1.f1, t2.f1; - five | f1 | f1 -------+-----------------------------------------------------------------+----------------------------------------------------------------- - | ["-infinity" "infinity"] | ["-infinity" "infinity"] - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] -(5 rows) - -SELECT '' AS fourteen, t1.f1 AS interval1, t2.f1 AS interval2 - FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2 - WHERE t1.f1 && t2.f1 and not t1.f1 = t2.f1 - ORDER BY interval1, interval2; - fourteen | interval1 | interval2 -----------+-----------------------------------------------------------------+----------------------------------------------------------------- - | ["-infinity" "infinity"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] - | ["-infinity" "infinity"] | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] - | ["-infinity" "infinity"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["-infinity" "infinity"] | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] | ["-infinity" "infinity"] - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] | ["-infinity" "infinity"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["-infinity" "infinity"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] | ["-infinity" "infinity"] - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] -(14 rows) - --- contains -SELECT '' AS five, t1.f1 - FROM TINTERVAL_TBL t1 - WHERE not t1.f1 << - tinterval '["Aug 15 14:23:19 1980" "Sep 16 14:23:19 1990"]' - ORDER BY t1.f1; - five | f1 -------+----------------------------------------------------------------- - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] - | ["Thu Feb 15 12:15:03 1990 PST" "Sun Sep 23 11:12:13 2001 PDT"] - | ["Sat May 10 23:59:12 1947 PST" "Sun Jan 14 03:14:21 1973 PST"] -(3 rows) - --- make time interval -SELECT '' AS three, t1.f1 - FROM TINTERVAL_TBL t1 - WHERE t1.f1 && - (abstime 'Aug 15 14:23:19 1983' <#> - abstime 'Sep 16 14:23:19 1983') - ORDER BY t1.f1; - three | f1 --------+----------------------------------------------------------------- - | ["-infinity" "infinity"] - | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"] - | ["Wed Dec 31 16:00:00 1969 PST" "Mon May 01 00:30:30 1995 PDT"] -(3 rows) - diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule index 16f979c8d93..8f07343c1a9 100644 --- a/src/test/regress/parallel_schedule +++ b/src/test/regress/parallel_schedule @@ -23,12 +23,12 @@ test: numerology # ---------- # The second group of parallel tests # ---------- -test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval abstime reltime tinterval inet macaddr macaddr8 tstypes +test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes # ---------- # Another group of parallel tests # geometry depends on point, lseg, box, path, polygon and circle -# horology depends on interval, timetz, timestamp, timestamptz, reltime and abstime +# horology depends on interval, timetz, timestamp, timestamptz # ---------- test: geometry horology regex oidjoins type_sanity opr_sanity misc_sanity comments expressions diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule index 42632be6750..265e2cda502 100644 --- a/src/test/regress/serial_schedule +++ b/src/test/regress/serial_schedule @@ -36,9 +36,6 @@ test: timetz test: timestamp test: timestamptz test: interval -test: abstime -test: reltime -test: tinterval test: inet test: macaddr test: macaddr8 diff --git a/src/test/regress/sql/abstime.sql b/src/test/regress/sql/abstime.sql deleted file mode 100644 index 4ab821b1b8c..00000000000 --- a/src/test/regress/sql/abstime.sql +++ /dev/null @@ -1,67 +0,0 @@ --- --- ABSTIME --- testing built-in time type abstime --- uses reltime and tinterval --- - --- --- timezones may vary based not only on location but the operating --- system. the main correctness issue is that the OS may not get --- daylight savings time right for times prior to Unix epoch (jan 1 1970). --- - -CREATE TABLE ABSTIME_TBL (f1 abstime); - -BEGIN; -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now'); -SELECT count(*) AS two FROM ABSTIME_TBL WHERE f1 = 'now' ; -END; - -DELETE FROM ABSTIME_TBL; - -INSERT INTO ABSTIME_TBL (f1) VALUES ('Jan 14, 1973 03:14:21'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'Mon May 1 00:30:30 1995'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'epoch'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'infinity'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime '-infinity'); -INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'May 10, 1947 23:59:12'); - --- what happens if we specify slightly misformatted abstime? -INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00'); -INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10'); - --- badly formatted abstimes: these should result in invalid abstimes -INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format'); -INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843'); - --- test abstime operators - -SELECT '' AS eight, * FROM ABSTIME_TBL; - -SELECT '' AS six, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 < abstime 'Jun 30, 2001'; - -SELECT '' AS six, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 > abstime '-infinity'; - -SELECT '' AS six, * FROM ABSTIME_TBL - WHERE abstime 'May 10, 1947 23:59:12' <> ABSTIME_TBL.f1; - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE abstime 'epoch' >= ABSTIME_TBL.f1; - -SELECT '' AS four, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 <= abstime 'Jan 14, 1973 03:14:21'; - -SELECT '' AS four, * FROM ABSTIME_TBL - WHERE ABSTIME_TBL.f1 <?> - tinterval '["Apr 1 1950 00:00:00" "Dec 30 1999 23:00:00"]'; - -SELECT '' AS four, f1 AS abstime, - date_part('year', f1) AS year, date_part('month', f1) AS month, - date_part('day',f1) AS day, date_part('hour', f1) AS hour, - date_part('minute', f1) AS minute, date_part('second', f1) AS second - FROM ABSTIME_TBL - WHERE isfinite(f1) - ORDER BY abstime; diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index 179bbfb9a1d..68903466374 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -35,12 +35,8 @@ ALTER TABLE attmp ADD COLUMN f int2; ALTER TABLE attmp ADD COLUMN g polygon; -ALTER TABLE attmp ADD COLUMN h abstime; - ALTER TABLE attmp ADD COLUMN i char; -ALTER TABLE attmp ADD COLUMN j abstime[]; - ALTER TABLE attmp ADD COLUMN k int4; ALTER TABLE attmp ADD COLUMN l tid; @@ -60,8 +56,6 @@ ALTER TABLE attmp ADD COLUMN s path; ALTER TABLE attmp ADD COLUMN t box; -ALTER TABLE attmp ADD COLUMN u tinterval; - ALTER TABLE attmp ADD COLUMN v timestamp; ALTER TABLE attmp ADD COLUMN w interval; @@ -72,13 +66,13 @@ ALTER TABLE attmp ADD COLUMN y float4[]; ALTER TABLE attmp ADD COLUMN z int2[]; -INSERT INTO attmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, +INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t, v, w, x, y, z) VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', - 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', + 'c', 314159, '(1,1)', '512', '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', - '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["epoch" "infinity"]', + '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', 'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); SELECT * FROM attmp; @@ -104,12 +98,8 @@ ALTER TABLE attmp ADD COLUMN f int2; ALTER TABLE attmp ADD COLUMN g polygon; -ALTER TABLE attmp ADD COLUMN h abstime; - ALTER TABLE attmp ADD COLUMN i char; -ALTER TABLE attmp ADD COLUMN j abstime[]; - ALTER TABLE attmp ADD COLUMN k int4; ALTER TABLE attmp ADD COLUMN l tid; @@ -129,8 +119,6 @@ ALTER TABLE attmp ADD COLUMN s path; ALTER TABLE attmp ADD COLUMN t box; -ALTER TABLE attmp ADD COLUMN u tinterval; - ALTER TABLE attmp ADD COLUMN v timestamp; ALTER TABLE attmp ADD COLUMN w interval; @@ -141,13 +129,13 @@ ALTER TABLE attmp ADD COLUMN y float4[]; ALTER TABLE attmp ADD COLUMN z int2[]; -INSERT INTO attmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, +INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t, v, w, x, y, z) VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', - 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', + 'c', 314159, '(1,1)', '512', '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', - '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["epoch" "infinity"]', + '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', 'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); SELECT * FROM attmp; diff --git a/src/test/regress/sql/horology.sql b/src/test/regress/sql/horology.sql index ca34e8753de..e356dd563ee 100644 --- a/src/test/regress/sql/horology.sql +++ b/src/test/regress/sql/horology.sql @@ -268,35 +268,6 @@ SELECT '' AS "226", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS d ORDER BY timestamp1, timestamp2, difference; -- --- abstime, reltime arithmetic --- - -SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime - FROM ABSTIME_TBL, RELTIME_TBL - WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1) < abstime 'Jan 14 14:00:00 1971' - ORDER BY abstime, reltime; - --- these four queries should return the same answer --- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and --- therefore, should not show up in the results. - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years - < abstime 'Jan 14 14:00:00 1977'; - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years - < abstime 'Jan 14 14:00:00 1971'; - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years - < abstime 'Jan 14 14:00:00 1971'; - -SELECT '' AS three, * FROM ABSTIME_TBL - WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years - < abstime 'Jan 14 14:00:00 1977'; - --- -- Conversions -- @@ -305,27 +276,6 @@ SELECT '' AS "16", f1 AS "timestamp", date(f1) AS date WHERE f1 <> timestamp 'now' ORDER BY date, "timestamp"; -SELECT '' AS "16", f1 AS "timestamp", abstime(f1) AS abstime - FROM TEMP_TIMESTAMP - ORDER BY abstime; - -SELECT '' AS four, f1 AS abstime, date(f1) AS date - FROM ABSTIME_TBL - WHERE isfinite(f1) AND f1 <> abstime 'now' - ORDER BY date, abstime; - -SELECT '' AS two, d1 AS "timestamp", abstime(d1) AS abstime - FROM TIMESTAMP_TBL WHERE NOT isfinite(d1); - -SELECT '' AS three, f1 as abstime, cast(f1 as timestamp) AS "timestamp" - FROM ABSTIME_TBL WHERE NOT isfinite(f1); - -SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime - FROM INTERVAL_TBL; - -SELECT '' AS six, f1 as reltime, CAST(f1 AS interval) AS interval - FROM RELTIME_TBL; - DROP TABLE TEMP_TIMESTAMP; -- @@ -338,22 +288,16 @@ SHOW DateStyle; SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL; -SELECT '' AS seven, f1 AS us_postgres FROM ABSTIME_TBL; - SET DateStyle TO 'US,ISO'; SELECT '' AS "64", d1 AS us_iso FROM TIMESTAMP_TBL; -SELECT '' AS seven, f1 AS us_iso FROM ABSTIME_TBL; - SET DateStyle TO 'US,SQL'; SHOW DateStyle; SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL; -SELECT '' AS seven, f1 AS us_sql FROM ABSTIME_TBL; - SET DateStyle TO 'European,Postgres'; SHOW DateStyle; @@ -364,24 +308,18 @@ SELECT count(*) as one FROM TIMESTAMP_TBL WHERE d1 = 'Jun 13 1957'; SELECT '' AS "65", d1 AS european_postgres FROM TIMESTAMP_TBL; -SELECT '' AS seven, f1 AS european_postgres FROM ABSTIME_TBL; - SET DateStyle TO 'European,ISO'; SHOW DateStyle; SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL; -SELECT '' AS seven, f1 AS european_iso FROM ABSTIME_TBL; - SET DateStyle TO 'European,SQL'; SHOW DateStyle; SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL; -SELECT '' AS seven, f1 AS european_sql FROM ABSTIME_TBL; - RESET DateStyle; -- diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql index a593d376438..5bb365e9da5 100644 --- a/src/test/regress/sql/opr_sanity.sql +++ b/src/test/regress/sql/opr_sanity.sql @@ -823,7 +823,6 @@ WHERE a.aggfnoid = p.oid AND -- Cross-check transfn against its entry in pg_proc. -- NOTE: use physically_coercible here, not binary_coercible, because --- max and min on abstime are implemented using int4larger/int4smaller. SELECT a.aggfnoid::oid, p.proname, ptr.oid, ptr.proname FROM pg_aggregate AS a, pg_proc AS p, pg_proc AS ptr WHERE a.aggfnoid = p.oid AND @@ -978,7 +977,6 @@ WHERE a.aggfnoid = p.oid AND -- Check that all combine functions have signature -- combine(transtype, transtype) returns transtype -- NOTE: use physically_coercible here, not binary_coercible, because --- max and min on abstime are implemented using int4larger/int4smaller. SELECT a.aggfnoid, p.proname FROM pg_aggregate as a, pg_proc as p diff --git a/src/test/regress/sql/reltime.sql b/src/test/regress/sql/reltime.sql deleted file mode 100644 index a07b64e29d8..00000000000 --- a/src/test/regress/sql/reltime.sql +++ /dev/null @@ -1,50 +0,0 @@ --- --- RELTIME --- - -CREATE TABLE RELTIME_TBL (f1 reltime); - -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 1 minute'); - -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 5 hour'); - -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 10 day'); - -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 34 year'); - -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 3 months'); - -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 14 seconds ago'); - - --- badly formatted reltimes -INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime'); - -INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago'); - --- test reltime operators - -SELECT '' AS six, * FROM RELTIME_TBL; - -SELECT '' AS five, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 <> reltime '@ 10 days'; - -SELECT '' AS three, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 <= reltime '@ 5 hours'; - -SELECT '' AS three, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 < reltime '@ 1 day'; - -SELECT '' AS one, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 = reltime '@ 34 years'; - -SELECT '' AS two, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 >= reltime '@ 1 month'; - -SELECT '' AS five, * FROM RELTIME_TBL - WHERE RELTIME_TBL.f1 > reltime '@ 3 seconds ago'; - -SELECT '' AS fifteen, r1.*, r2.* - FROM RELTIME_TBL r1, RELTIME_TBL r2 - WHERE r1.f1 > r2.f1 - ORDER BY r1.f1, r2.f1; diff --git a/src/test/regress/sql/tinterval.sql b/src/test/regress/sql/tinterval.sql deleted file mode 100644 index 42399ce694a..00000000000 --- a/src/test/regress/sql/tinterval.sql +++ /dev/null @@ -1,97 +0,0 @@ --- --- TINTERVAL --- - -CREATE TABLE TINTERVAL_TBL (f1 tinterval); - --- Should accept any abstime, --- so do not bother with extensive testing of values - -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["-infinity" "infinity"]'); - -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]'); - -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]'); - -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["epoch" "Mon May 1 00:30:30 1995"]'); - -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["Feb 15 1990 12:15:03" "2001-09-23 11:12:13"]'); - - --- badly formatted tintervals -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["bad time specifications" ""]'); - -INSERT INTO TINTERVAL_TBL (f1) - VALUES ('["" "infinity"]'); - --- test tinterval operators - -SELECT '' AS five, * FROM TINTERVAL_TBL; - --- length == -SELECT '' AS one, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #= '@ 1 months'; - --- length <> -SELECT '' AS three, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #<> '@ 1 months'; - --- length < -SELECT '' AS zero, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #< '@ 1 month'; - --- length <= -SELECT '' AS one, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #<= '@ 1 month'; - --- length > -SELECT '' AS three, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #> '@ 1 year'; - --- length >= -SELECT '' AS three, t.* - FROM TINTERVAL_TBL t - WHERE t.f1 #>= '@ 3 years'; - --- overlaps -SELECT '' AS three, t1.* - FROM TINTERVAL_TBL t1 - WHERE t1.f1 && - tinterval '["Aug 15 14:23:19 1983" "Sep 16 14:23:19 1983"]'; - -SELECT '' AS five, t1.f1, t2.f1 - FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2 - WHERE t1.f1 && t2.f1 and - t1.f1 = t2.f1 - ORDER BY t1.f1, t2.f1; - -SELECT '' AS fourteen, t1.f1 AS interval1, t2.f1 AS interval2 - FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2 - WHERE t1.f1 && t2.f1 and not t1.f1 = t2.f1 - ORDER BY interval1, interval2; - --- contains -SELECT '' AS five, t1.f1 - FROM TINTERVAL_TBL t1 - WHERE not t1.f1 << - tinterval '["Aug 15 14:23:19 1980" "Sep 16 14:23:19 1990"]' - ORDER BY t1.f1; - --- make time interval -SELECT '' AS three, t1.f1 - FROM TINTERVAL_TBL t1 - WHERE t1.f1 && - (abstime 'Aug 15 14:23:19 1983' <#> - abstime 'Sep 16 14:23:19 1983') - ORDER BY t1.f1; |