Re: Bug in date arithmetic - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug in date arithmetic
Date
Msg-id 8963.1251157686@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug in date arithmetic  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Bug in date arithmetic  (David Fetter <david@fetter.org>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> I realize I'm in a minority on this, but I would also prefer an error.
> I expect things like
> SELECT "date" + (INTERVAL '1' YEAR)
> to just work.

Uh, I think you're confused.  That certainly works, and I didn't hear
anyone proposing to change it.  The issue is about undecorated literals.
If we start throwing errors for those, the fallout will make the 8.3
implicit-cast changes look like a day at the beach.  I believe that
it would also violate the SQL spec in numerous places --- whether you
like it or not, the concept of context-dependent type resolution is
built into the standard.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Paul Matthews
Date:
Subject: Re: Slaying the HYPOTamus
Next
From: Josh Berkus
Date:
Subject: Re: 8.5 release timetable, again