Timetz comparison - Mailing list pgsql-hackers

From Alexey Bashtanov
Subject Timetz comparison
Date
Msg-id acf5d520-2807-dff4-a52a-b37a551d97df@imap.cc
Whole thread Raw
Responses Re: Timetz comparison  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello,

Comparison of timetz values looks a bit weird to me, as 
'22:00+02'::timetz > '21:00+01'::timetz.
I can see this behavior introduced by commit 2792374c in 2001
with the comment "timetz was just plain broken (some possible pairs of 
values were neither < nor = nor >)".

The in-code comment is:
/*
  * If same GMT time, sort by timezone; we only want to say that two
  * timetz's are equal if both the time and zone parts are equal.
  */

However I found no specification on how timetz values are compared 
neither in postgres docs
nor in the standard (http://www.wiscorp.com/sql20nn.zip).

Was this decision made just to be definite?

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

Thanks

Best regards,
   Alexey



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Next
From: Tom Lane
Date:
Subject: Re: Timetz comparison