select '06:00:00'::TIME - ('19:00:00'::TIME - '07:00:23.388471'::TIME);
+-----------------+
| ?column? |
|-----------------|
| 18:00:23.388471 |
+-----------------+
SELECT 1
Time: 0.012s
Why isn't it returning a negative result? I'm using the latest version of PostgreSQL.
'06:00:00'
) an interval (the result of('19:00:00'::TIME - '07:00:23.388471'::TIME)
). The result oftime - interval
is a time value. And time values are only between'00:00:00'
and'24:00:00'
select '06:00:00'::TIME, '06:00:00'::TIME + interval '24 hour', '06:00:00'::TIME - interval '24 hour' ;
. You'll get three identical values.