Re: Timetz comparison

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
Cc: pgsql-hackers(at)postgresql(dot)org, Ilya Bashtanov <bashtanov(at)gmail(dot)com>
Subject: Re: Timetz comparison
Date: 2018-05-25 22:33:05
Message-ID: 18049.1527287585@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alexey Bashtanov <bashtanov(at)imap(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2018-05-25 22:37:56 Re: SPI/backend equivalent of extended-query Describe(statement)?
Previous Message Alexey Bashtanov 2018-05-25 22:08:04 Timetz comparison