Geoff Caplan wrote:
> where $2 is a well-formed ISO date.
>
> Query works as expected when there are records in the result set. When
> the result set is empty, PG throws an error:
>
> date/time field value out of range: "2011-4-31"
Is April 31st really a well-formed ISO date? I wonder what jhey smoke
there in ISO meetings.
My guess is that you're doing date arithmetic wrong somewhere.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.