summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/horology.out
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-07-29 00:03:19 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-07-29 00:03:19 +0000
commit9c2a7c2269d1ecebd7f83e769bb2640cb82fa0e0 (patch)
treef868b45501a84e01215cefb03754bab63e23730b /src/test/regress/expected/horology.out
parent2baf4efe09f65d8e8cac32fb882ab9f0fd601574 (diff)
downloadpostgresql-9c2a7c2269d1ecebd7f83e769bb2640cb82fa0e0.tar.gz
Apply (a somewhat revised version of) Greg Mullane's patch to eliminate
heuristic determination of day vs month in date/time input. Add the ability to specify that input is interpreted as yy-mm-dd order (which formerly worked, but only for yy greater than 31). DateStyle's input component now has the preferred spellings DMY, MDY, or YMD; the older keywords European and US are now aliases for the first two of these. Per recent discussions on pgsql-general.
Diffstat (limited to 'src/test/regress/expected/horology.out')
-rw-r--r--src/test/regress/expected/horology.out41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out
index 735e703e4c..984e75e8b4 100644
--- a/src/test/regress/expected/horology.out
+++ b/src/test/regress/expected/horology.out
@@ -3,7 +3,7 @@
--
-- needed so tests pass even in Australia
SET australian_timezones = 'off';
-SET DateStyle = 'Postgres,US';
+SET DateStyle = 'Postgres, MDY';
--
-- Test various input formats
--
@@ -79,12 +79,17 @@ SELECT timestamp with time zone '12/27/2001 04:05:06.789-08';
Thu Dec 27 04:05:06.789 2001 PST
(1 row)
+-- should fail in mdy mode:
+SELECT timestamp with time zone '27/12/2001 04:05:06.789-08';
+ERROR: invalid input syntax for timestamp with time zone: "27/12/2001 04:05:06.789-08"
+set datestyle to dmy;
SELECT timestamp with time zone '27/12/2001 04:05:06.789-08';
timestamptz
----------------------------------
- Thu Dec 27 04:05:06.789 2001 PST
+ Thu 27 Dec 04:05:06.789 2001 PST
(1 row)
+reset datestyle;
SELECT timestamp with time zone 'Y2001M12D27H04M05S06.789+08';
timestamptz
----------------------------------
@@ -170,13 +175,13 @@ SELECT timestamp with time zone 'J2452271T040506.789-08';
(1 row)
-- German/European-style dates with periods as delimiters
-SELECT timestamp with time zone '27.12.2001 04:05:06.789+08';
+SELECT timestamp with time zone '12.27.2001 04:05:06.789+08';
timestamptz
----------------------------------
Wed Dec 26 12:05:06.789 2001 PST
(1 row)
-SELECT timestamp with time zone '27.12.2001 04:05:06.789-08';
+SELECT timestamp with time zone '12.27.2001 04:05:06.789-08';
timestamptz
----------------------------------
Thu Dec 27 04:05:06.789 2001 PST
@@ -257,7 +262,7 @@ SELECT time with time zone 'T040506.789 -08';
04:05:06.7890-08
(1 row)
-SET DateStyle = 'Postgres,US';
+SET DateStyle = 'Postgres, MDY';
--
-- date, time arithmetic
--
@@ -2385,9 +2390,9 @@ DROP TABLE TEMP_TIMESTAMP;
--
SET DateStyle TO 'US,Postgres';
SHOW DateStyle;
- DateStyle
---------------
- Postgres, US
+ DateStyle
+---------------
+ Postgres, MDY
(1 row)
SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
@@ -2557,7 +2562,7 @@ SET DateStyle TO 'US,SQL';
SHOW DateStyle;
DateStyle
-----------
- SQL, US
+ SQL, MDY
(1 row)
SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
@@ -2643,9 +2648,9 @@ SELECT '' AS seven, f1 AS us_sql FROM ABSTIME_TBL;
SET DateStyle TO 'European,Postgres';
SHOW DateStyle;
- DateStyle
---------------------
- Postgres, European
+ DateStyle
+---------------
+ Postgres, DMY
(1 row)
INSERT INTO TIMESTAMP_TBL VALUES('13/06/1957');
@@ -2739,9 +2744,9 @@ SELECT '' AS seven, f1 AS european_postgres FROM ABSTIME_TBL;
SET DateStyle TO 'European,ISO';
SHOW DateStyle;
- DateStyle
----------------
- ISO, European
+ DateStyle
+-----------
+ ISO, DMY
(1 row)
SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
@@ -2828,9 +2833,9 @@ SELECT '' AS seven, f1 AS european_iso FROM ABSTIME_TBL;
SET DateStyle TO 'European,SQL';
SHOW DateStyle;
- DateStyle
----------------
- SQL, European
+ DateStyle
+-----------
+ SQL, DMY
(1 row)
SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;