Re: Interval "1 month" is equals to interval "30 days" - WHY?

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Craig Ringer *EXTERN*" <ringerc(at)ringerc(dot)id(dot)au>
Cc: <pgsql-general(at)postgresql(dot)org>, <dmitry(at)koterov(dot)ru>
Subject: Re: Interval "1 month" is equals to interval "30 days" - WHY?
Date: 2012-08-08 12:56:20
Message-ID: D960CB61B694CF459DCFB4B0128514C208419839@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Craig Ringer wrote:
>> Of course this is not always correct.
>> But what should the result of
>> INTERVAL '1 month' = INTERVAL '30 days'
>> be? FALSE would be just as wrong.

> NULL? In all honesty, it's a reasonable fit for NULL in its
> "uncertain/unknowable" personality, because two intervals that don't
> use the same time scales aren't truly comparable for equality.

Hmmm. How would you define an ordering in that case?
And without an ordering, you couldn't use "btree" indexes
on interval columns, right?

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mwkhan 2012-08-08 13:20:35 pgAgent job keeps running
Previous Message Albe Laurenz 2012-08-08 12:51:16 Re: Interval "1 month" is equals to interval "30 days" - WHY?