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

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
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 13:39:35
Message-ID: 50226C17.2000900@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/08/2012 08:56 PM, Albe Laurenz wrote:
>
> Hmmm. How would you define an ordering in that case?
> And without an ordering, you couldn't use "btree" indexes
> on interval columns, right?
Or, as Anthony noted, what about leap seconds?

I'm not advocating changing the behaviour of interval types. They're a
compromise for best functionality in the face of crazy and stupid
real-world rules. I just wanted to point out that intervals are
inconsistent in all sorts of ways, and that there really isn't a good
answer.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Samba 2012-08-08 13:54:51 Re: warnings about invalid "search_path"
Previous Message mwkhan 2012-08-08 13:20:35 pgAgent job keeps running