Commit d74c52c3 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Allow more timezone-like interpretation of INTERVALs.

parent a669bd74
...@@ -3,44 +3,44 @@ ...@@ -3,44 +3,44 @@
-- --
SET DATESTYLE = DEFAULT; SET DATESTYLE = DEFAULT;
-- check acceptance of "time zone style" -- check acceptance of "time zone style"
SELECT INTERVAL '01:00'; SELECT INTERVAL '01:00' AS "One hour";
?column? One hour
---------- ----------
+01:00 +01:00
(1 row) (1 row)
SELECT INTERVAL '+02:00'; SELECT INTERVAL '+02:00' AS "Two hours";
?column? Two hours
---------- -----------
+02:00 +02:00
(1 row) (1 row)
SELECT INTERVAL '-08:00'; SELECT INTERVAL '-08:00' AS "Eight hours";
?column? Eight hours
---------- -------------
-08:00 -08:00
(1 row) (1 row)
SELECT INTERVAL '-05'; SELECT INTERVAL '-05' AS "Five hours";
?column? Five hours
----------- ------------
-00:00:05 -05:00
(1 row) (1 row)
SELECT INTERVAL '-1 +02:03'; SELECT INTERVAL '-1 +02:03' AS "22 hours ago...";
?column? 22 hours ago...
---------- -----------------
-21:57 -21:57
(1 row) (1 row)
SELECT INTERVAL '-1 days +02:03'; SELECT INTERVAL '-1 days +02:03' AS "22 hours ago...";
?column? 22 hours ago...
---------- -----------------
-21:57 -21:57
(1 row) (1 row)
SELECT INTERVAL '10 years -11 month -12 days +13:14'; SELECT INTERVAL '10 years -11 month -12 days +13:14' AS "9 years...";
?column? 9 years...
-------------------------- --------------------------
9 years 1 mon -11 -10:46 9 years 1 mon -11 -10:46
(1 row) (1 row)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment