From 367bc8f1afa22df8b76ab48c26f5298b912c05ee Mon Sep 17 00:00:00 2001 From: Tom Lane <tgl@sss.pgh.pa.us> Date: Tue, 12 Sep 2000 20:11:23 +0000 Subject: [PATCH] Update expected/horology-no-DST-before-1970.out for new horology test. There are still two out-of-date variants for horology; shame shame. --- .../expected/horology-no-DST-before-1970.out | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/test/regress/expected/horology-no-DST-before-1970.out b/src/test/regress/expected/horology-no-DST-before-1970.out index 217afeb97d6..af0e6861a8a 100644 --- a/src/test/regress/expected/horology-no-DST-before-1970.out +++ b/src/test/regress/expected/horology-no-DST-before-1970.out @@ -2,6 +2,48 @@ -- HOROLOGY -- -- +-- date, time arithmetic +-- +SELECT date '1981-02-03' + time '04:05:06' AS "Date + Time"; + Date + Time +------------------------------ + Tue Feb 03 04:05:06 1981 PST +(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 PST +(1 row) + +SELECT date '2001-12-13' - interval '2 years' AS "Subtract Two Years"; + Subtract Two Years +------------------------------ + Mon Dec 13 00:00:00 1999 PST +(1 row) + +SELECT date '1991-02-03' - time '04:05:06' AS "Subtract Time"; + Subtract Time +------------------------------ + Sat Feb 02 19:54:54 1991 PST +(1 row) + +SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time UTC"; +ERROR: Unable to identify an operator '-' for types 'date' and 'timetz' + You will have to retype this query using an explicit cast +-- -- timestamp, interval arithmetic -- SELECT timestamp '1996-03-01' - interval '1 second' AS "Feb 29"; -- GitLab