Re: BUG #7797: datetime + '1 month'::interval is going outside of a month's bounds

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Ryan Kelly <rpkelly22(at)gmail(dot)com>
Cc: afonit(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7797: datetime + '1 month'::interval is going outside of a month's bounds
Date: 2013-01-07 17:42:40
Message-ID: CA+mi_8bbtcvG6n9gm7EAnh5KNb=nJMjqg8prn=DhzLh0RX5Acw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jan 7, 2013 at 5:19 PM, Ryan Kelly <rpkelly22(at)gmail(dot)com> wrote:

> '1 month'::interval is the same as '30 days'::interval.

No, it's not.

# select '2012-07-31'::date + '1 month'::interval, '2012-07-31'::date
+ '30 days'::interval;
?column? | ?column?
---------------------+---------------------
2012-08-31 00:00:00 | 2012-08-30 00:00:00

-- Daniele

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ryan Kelly 2013-01-07 17:47:26 Re: BUG #7797: datetime + '1 month'::interval is going outside of a month's bounds
Previous Message jared 2013-01-07 17:26:15 Re: BUG #7797: datetime + '1 month'::interval is going outside of a month's bounds