]> granicus.if.org Git - postgresql/blobdiff - src/test/regress/expected/horology-no-DST-before-1970.out
Cause SHOW DATESTYLE to produce a string that will be accepted by SET
[postgresql] / src / test / regress / expected / horology-no-DST-before-1970.out
index b8b7423ec520f01c286b2f5a72b5758255e2279f..1ad38e348611f3634de720e7bf92a9785b4ac02f 100644 (file)
@@ -196,15 +196,31 @@ SELECT timestamp with time zone '27.12.2001 04:05:06.789-08';
 (1 row)
 
 SET DateStyle = 'ISO';
--- Reject time without time zone having a time zone specified
+-- As of 7.4, allow time without time zone having a time zone specified
 SELECT time without time zone '040506.789+08';
-ERROR:  Bad time external representation '040506.789+08'
+     time      
+---------------
+ 04:05:06.7890
+(1 row)
+
 SELECT time without time zone '040506.789-08';
-ERROR:  Bad time external representation '040506.789-08'
+     time      
+---------------
+ 04:05:06.7890
+(1 row)
+
 SELECT time without time zone 'T040506.789+08';
-ERROR:  Bad time external representation 'T040506.789+08'
+     time      
+---------------
+ 04:05:06.7890
+(1 row)
+
 SELECT time without time zone 'T040506.789-08';
-ERROR:  Bad time external representation 'T040506.789-08'
+     time      
+---------------
+ 04:05:06.7890
+(1 row)
+
 SELECT time with time zone '040506.789+08';
       timetz      
 ------------------
@@ -283,8 +299,8 @@ SELECT date '1991-02-03' - time '04:05:06' AS "Subtract Time";
 (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 'time with time zone'
-       You will have to retype this query using an explicit cast
+ERROR:  operator does not exist: date - time with time zone
+HINT:  No operator matches the given name and argument type(s). You may need to add explicit typecasts.
 --
 -- timestamp, interval arithmetic
 --
@@ -312,6 +328,30 @@ SELECT timestamp without time zone '1999-12-01' + interval '1 month - 1 second'
  Fri Dec 31 23:59:59 1999
 (1 row)
 
+SELECT timestamp without time zone 'Jan 1, 4713 BC' + interval '106000000 days' AS "Feb 23, 285506";
+       Feb 23, 285506       
+----------------------------
+ Fri Feb 23 00:00:00 285506
+(1 row)
+
+SELECT timestamp without time zone 'Jan 1, 4713 BC' + interval '107000000 days' AS "Jan 20, 288244";
+       Jan 20, 288244       
+----------------------------
+ Sat Jan 20 00:00:00 288244
+(1 row)
+
+SELECT timestamp without time zone 'Jan 1, 4713 BC' + interval '109203489 days' AS "Dec 31, 294276";
+       Dec 31, 294276       
+----------------------------
+ Sun Dec 31 00:00:00 294276
+(1 row)
+
+SELECT timestamp without time zone '12/31/294276' - timestamp without time zone '12/23/1999' AS "106751991 Days";
+  106751991 Days  
+------------------
+ @ 106751991 days
+(1 row)
+
 -- Shorthand values
 -- Not directly usable for regression testing since these are not constants.
 -- So, just try to test parser and hope for the best - thomas 97/04/26
@@ -2345,9 +2385,9 @@ DROP TABLE TEMP_TIMESTAMP;
 --
 SET DateStyle TO 'US,Postgres';
 SHOW DateStyle;
-                 DateStyle                  
---------------------------------------------
- Postgres with US (NonEuropean) conventions
+  DateStyle   
+--------------
+ Postgres, US
 (1 row)
 
 SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
@@ -2515,9 +2555,9 @@ SELECT '' AS seven, f1 AS us_iso FROM ABSTIME_TBL;
 
 SET DateStyle TO 'US,SQL';
 SHOW DateStyle;
-               DateStyle               
----------------------------------------
- SQL with US (NonEuropean) conventions
+ DateStyle 
+-----------
+ SQL, US
 (1 row)
 
 SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
@@ -2603,9 +2643,9 @@ SELECT '' AS seven, f1 AS us_sql FROM ABSTIME_TBL;
 
 SET DateStyle TO 'European,Postgres';
 SHOW DateStyle;
-             DateStyle              
-------------------------------------
- Postgres with European conventions
+     DateStyle      
+--------------------
+ Postgres, European
 (1 row)
 
 INSERT INTO TIMESTAMP_TBL VALUES('13/06/1957');
@@ -2699,9 +2739,9 @@ SELECT '' AS seven, f1 AS european_postgres FROM ABSTIME_TBL;
 
 SET DateStyle TO 'European,ISO';
 SHOW DateStyle;
-           DateStyle           
--------------------------------
- ISO with European conventions
+   DateStyle   
+---------------
+ ISO, European
 (1 row)
 
 SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
@@ -2788,9 +2828,9 @@ SELECT '' AS seven, f1 AS european_iso FROM ABSTIME_TBL;
 
 SET DateStyle TO 'European,SQL';
 SHOW DateStyle;
-           DateStyle           
--------------------------------
- SQL with European conventions
+   DateStyle   
+---------------
+ SQL, European
 (1 row)
 
 SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;