Re: Calculating the difference between timetz values - Mailing list pgsql-general

From Tom Lane
Subject Re: Calculating the difference between timetz values
Date
Msg-id 13123.1248716981@sss.pgh.pa.us
Whole thread Raw
In response to Re: Calculating the difference between timetz values  (Alexey Klyukin <alexk@commandprompt.com>)
Responses Re: Calculating the difference between timetz values
List pgsql-general
Alexey Klyukin <alexk@commandprompt.com> writes:
> On Jul 27, 2009, at 6:52 PM, Michael Glaesemann wrote:
>> I don't have a solution, but am curious what your use case is for
>> timetz (as opposed to timestamptz).

> I'm writing a custom trigger function that has to compare values of
> time* types and make some actions depending on a result.

It's still fairly unclear why you think that comparing timetz values
is a useful activity.  Is "23:32" earlier or later than "00:32"?
How can you tell whether it's the same day or different days?  Adding
timezones into that doesn't make it better.

Our documentation deprecates timetz as a poorly-defined datatype,
and I've never seen a reason to argue with that judgment.  I'd suggest
taking a very hard look at why you're not using timestamptz instead.

            regards, tom lane

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Postgres and multiple updates in one statement
Next
From: Jeff Davis
Date:
Subject: Re: Relational Algebra and Aggregate Functions