Re: Timetz comparison - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Timetz comparison
Date
Msg-id 18049.1527287585@sss.pgh.pa.us
Whole thread Raw
In response to Timetz comparison  (Alexey Bashtanov <bashtanov@imap.cc>)
Responses Re: Timetz comparison  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
Alexey Bashtanov <bashtanov@imap.cc> writes:
> Comparison of timetz values looks a bit weird to me, as 
> '22:00+02'::timetz > '21:00+01'::timetz.

Perhaps, but I don't think there's a reasonable case for considering
them equal, either.  In the other places where obviously-different
values compare equal, such as zero versus minus zero in IEEE floats,
it's widely understood as a gotcha.

> What's the problem with these values to be considered equal?
> Backward compatibility? Hash algorithms?

Even if you'd made a case why we should consider them equal,
those would be very good reasons not to change behavior that's
stood for 17 years.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Alexey Bashtanov
Date:
Subject: Timetz comparison
Next
From: Chapman Flack
Date:
Subject: Re: SPI/backend equivalent of extended-query Describe(statement)?