Re: Interval "1 month" is equals to interval "30 days" - WHY? - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Interval "1 month" is equals to interval "30 days" - WHY?
Date
Msg-id D960CB61B694CF459DCFB4B0128514C208419839@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: Interval "1 month" is equals to interval "30 days" - WHY?  (Craig Ringer <ringerc@ringerc.id.au>)
Responses Re: Interval "1 month" is equals to interval "30 days" - WHY?  (Craig Ringer <ringerc@ringerc.id.au>)
List 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

pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Interval "1 month" is equals to interval "30 days" - WHY?
Next
From: mwkhan
Date:
Subject: pgAgent job keeps running