elwood(at)agouros(dot)de (Konstantinos Agouros) writes:
> I have a column of times that I would need to sum up for accounting purposes.
> Since sum(time) does not seem to be defined anybody got an easy clue how to
> do this?
We don't have addition of times defined at all, so how would you expect
sum() to exist? Try casting the times to some datatype for which
addition makes sense, eg interval.
The reason time addition isn't defined is that it's not clear what
people would want. Is '9:12 PM' + '4:23 AM' even sensible? If
so, does it mean '1:35 AM' or '1 day 1 hour 35 minutes'? Casting
to interval makes clear that you want the latter interpretation.
regards, tom lane