Timetz comparison

Поиск
Список
Период
Сортировка
От Alexey Bashtanov
Тема Timetz comparison
Дата
Msg-id acf5d520-2807-dff4-a52a-b37a551d97df@imap.cc
обсуждение исходный текст
Ответы Re: Timetz comparison  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Timetz comparison