Last active
August 29, 2015 14:03
-
-
Save gurjeet/3f6f8db52454ef557505 to your computer and use it in GitHub Desktop.
Postgres Weird interval representation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres=# select '6 days 23:45:00'::interval - '6 days 23:23:00'::interval; | |
?column? | |
---------- | |
00:22:00 | |
(1 row) | |
postgres=# select '00:46:00'::interval - '00:24:00'::interval; | |
?column? | |
---------- | |
00:22:00 | |
(1 row) | |
postgres=# select '6 days 00:16:00'::interval - '5 days 23:54:00'::interval; | |
?column? | |
----------------- | |
1 day -23:38:00 | |
(1 row) | |
postgres=# select '5 days 23:47:00'::interval - '5 days 23:25:00'::interval; | |
?column? | |
---------- | |
00:22:00 | |
(1 row) | |
postgres=# select '6 days 01:39:00'::interval - '6 days 01:18:00'::interval; | |
?column? | |
---------- | |
00:21:00 | |
(1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment