Kevin Grittner <kgrittn@ymail.com> writes:
> avpro avpro <avprowebeden@gmail.com> wrote:
>> select '12:00'::time - '9:00'::time; didn't work.
> I get this on 9.3:
> test=# select '12:00'::time - '9:00'::time;
> �?column?
> ----------
> �03:00:00
Note that that yields an interval, not a time. I think the OP may
be unhappy about the type mismatch. He could just add a cast,
though. In the addition case, casting one or both of the times to
interval might do what he wants, too, depending on whether he's
looking for wraparound behavior:
regression=# select '12:00'::time + '19:00'::time::interval;
?column?
----------
07:00:00
(1 row)
regression=# select '12:00'::time::interval + '19:00'::time::interval;
?column?
----------
31:00:00
(1 row)
regards, tom lane