diff options
| author | Thomas G. Lockhart | 2001-10-18 17:30:21 +0000 |
|---|---|---|
| committer | Thomas G. Lockhart | 2001-10-18 17:30:21 +0000 |
| commit | 9310075a13c28fc77224094d2cf3cc1c03446b4a (patch) | |
| tree | 64e430f8525c5782e26d3ddede403829836909c6 /src/test | |
| parent | 6254465d0621f724cdc9a1e99da24fa8a29f579d (diff) | |
Accept an INTERVAL argument for SET TIME ZONE per SQL99.
Modified the parser and the SET handlers to use full Node structures
rather than simply a character string argument.
Implement INTERVAL() YEAR TO MONTH (etc) syntax per SQL99.
Does not yet accept the goofy string format that goes along with, but
this should be fairly straight forward to fix now as a bug or later
as a feature.
Implement precision for the INTERVAL() type.
Use the typmod mechanism for both of INTERVAL features.
Fix the INTERVAL syntax in the parser:
opt_interval was in the wrong place.
INTERVAL is now a reserved word, otherwise we get reduce/reduce errors.
Implement an explicit date_part() function for TIMETZ.
Should fix coersion problem with INTERVAL reported by Peter E.
Fix up some error messages for date/time types.
Use all caps for type names within message.
Fix recently introduced side-effect bug disabling 'epoch' as a recognized
field for date_part() etc. Reported by Peter E. (??)
Bump catalog version number.
Rename "microseconds" current transaction time field
from ...Msec to ...Usec. Duh!
date/time regression tests updated for reference platform, but a few
changes will be necessary for others.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/horology.out | 10 | ||||
| -rw-r--r-- | src/test/regress/expected/timestamp.out | 4 | ||||
| -rw-r--r-- | src/test/regress/expected/timestamptz.out | 4 | ||||
| -rw-r--r-- | src/test/regress/sql/horology.sql | 10 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out index 21ad6469b89..c0dec193906 100644 --- a/src/test/regress/expected/horology.out +++ b/src/test/regress/expected/horology.out @@ -1310,9 +1310,9 @@ SELECT '' AS "16", f1 AS "timestamp" | 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 +SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS "interval", d.f1 + t.f1 AS plus FROM TEMP_TIMESTAMP d, INTERVAL_TBL t - ORDER BY plus, "timestamp", interval; + 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 @@ -1477,10 +1477,10 @@ SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS interval, d.f1 + t.f1 AS plus | 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 +SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS "interval", d.f1 - t.f1 AS minus FROM TEMP_TIMESTAMP d, INTERVAL_TBL t WHERE isfinite(d.f1) - ORDER BY minus, "timestamp", interval; + 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 @@ -2084,7 +2084,7 @@ SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime | @ 5 mons 12 hours | @ 5 mons 12 hours (10 rows) -SELECT '' AS six, f1 as reltime, interval(f1) AS interval +SELECT '' AS six, f1 as reltime, CAST(f1 AS interval) AS interval FROM RELTIME_TBL; six | reltime | interval -----+---------------+--------------- diff --git a/src/test/regress/expected/timestamp.out b/src/test/regress/expected/timestamp.out index 9405e8ba1cb..70fa14c31a6 100644 --- a/src/test/regress/expected/timestamp.out +++ b/src/test/regress/expected/timestamp.out @@ -59,7 +59,7 @@ INSERT INTO TIMESTAMP_TBL VALUES ('infinity'); INSERT INTO TIMESTAMP_TBL VALUES ('epoch'); -- Obsolete special values INSERT INTO TIMESTAMP_TBL VALUES ('invalid'); -ERROR: Timestamp 'invalid' no longer supported +ERROR: TIMESTAMP 'invalid' no longer supported -- Postgres v6.0 standard output format INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST'); INSERT INTO TIMESTAMP_TBL VALUES ('Invalid Abstime'); @@ -137,7 +137,7 @@ INSERT INTO TIMESTAMP_TBL VALUES ('Jan 01 17:32:01 2001'); INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 -0097'); ERROR: Bad timestamp external representation 'Feb 16 17:32:01 -0097' INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 5097 BC'); -ERROR: Timestamp out of range 'Feb 16 17:32:01 5097 BC' +ERROR: TIMESTAMP out of range 'Feb 16 17:32:01 5097 BC' SELECT '' AS "64", d1 FROM TIMESTAMP_TBL; 64 | d1 ----+----------------------------- diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out index ed11d1629d9..dd7ef75ce8f 100644 --- a/src/test/regress/expected/timestamptz.out +++ b/src/test/regress/expected/timestamptz.out @@ -54,7 +54,7 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('infinity'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch'); -- Obsolete special values INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid'); -ERROR: Timestamp with time zone 'invalid' no longer supported +ERROR: TIMESTAMP WITH TIME ZONE 'invalid' no longer supported -- Postgres v6.0 standard output format INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('Invalid Abstime'); @@ -132,7 +132,7 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2001'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097'); ERROR: Bad timestamp external representation 'Feb 16 17:32:01 -0097' INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC'); -ERROR: Timestamp out of range 'Feb 16 17:32:01 5097 BC' +ERROR: TIMESTAMP WITH TIME ZONE out of range 'Feb 16 17:32:01 5097 BC' SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL; 64 | d1 ----+--------------------------------- diff --git a/src/test/regress/sql/horology.sql b/src/test/regress/sql/horology.sql index 956e6697ee7..9e4652171ad 100644 --- a/src/test/regress/sql/horology.sql +++ b/src/test/regress/sql/horology.sql @@ -177,14 +177,14 @@ SELECT '' AS "16", f1 AS "timestamp" FROM TEMP_TIMESTAMP ORDER BY "timestamp"; -SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS interval, d.f1 + t.f1 AS plus +SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS "interval", d.f1 + t.f1 AS plus FROM TEMP_TIMESTAMP d, INTERVAL_TBL t - ORDER BY plus, "timestamp", interval; + ORDER BY plus, "timestamp", "interval"; -SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS interval, d.f1 - t.f1 AS minus +SELECT '' AS "160", d.f1 AS "timestamp", t.f1 AS "interval", d.f1 - t.f1 AS minus FROM TEMP_TIMESTAMP d, INTERVAL_TBL t WHERE isfinite(d.f1) - ORDER BY minus, "timestamp", interval; + ORDER BY minus, "timestamp", "interval"; SELECT '' AS "16", d.f1 AS "timestamp", timestamp '1980-01-06 00:00 GMT' AS gpstime_zero, d.f1 - timestamp '1980-01-06 00:00 GMT' AS difference @@ -250,7 +250,7 @@ SELECT '' AS three, f1 as abstime, cast(f1 as timestamp) AS "timestamp" SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime FROM INTERVAL_TBL; -SELECT '' AS six, f1 as reltime, interval(f1) AS interval +SELECT '' AS six, f1 as reltime, CAST(f1 AS interval) AS interval FROM RELTIME_TBL; DROP TABLE TEMP_TIMESTAMP; |
