afonit@gmail.com writes:
> This query:
> select
> '2012-01-31'::date + '1 month'::interval
> Produces this result:
> "2012-02-29 00:00:00"
> 2012-02-29 is not a valid date. February only goes to 28 days.
Uh, 2012 was a leap year, and so 2012-02-29 is a perfectly valid date.
> I am not sure what the expected behavior should be, but what I was expecting
> is (in the above instance):
> Adding one month to 2012-01-31 would yield the last day of February
It did.
regards, tom lane