BUG #4110: Error on select doing (date +1) - Mailing list pgsql-bugs

From Josep Llort
Subject BUG #4110: Error on select doing (date +1)
Date
Msg-id 200804170654.m3H6sgTg099129@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4110
Logged by:          Josep Llort
Email address:      Jllort@git.es
PostgreSQL version: 8.1 8.2 8.3
Operating system:   Ubuntu Linux
Description:        Error on select doing (date +1)
Details:

I found it when I upgrading jdbc jar file. I was using
postgresql-8.0-322.jdbc3.jar that runs propertly.

I've tested all upper versions 8.1, 8.2, since postgresql-8.3-603.jdbc3.jar
an all seems has the same problem.

On my select i've got something like this:
" and ? + cast(emp_estmin as int) <= ? + 1 "

'?' are date initialized on java code with ps.setDate(4, new
java.sql.Date(startDate.getTime()));

The error occurs when trying to add some int value to a date ( to
incremental purposes ).

The error ocurred is:
ERROR: invalid input syntax for integer: "2008-05-01 +02:00"

pgsql-bugs by date:

Previous
From: Fujii Masao
Date:
Subject: Re: BUG #4109: Typo in documentation
Next
From:
Date:
Subject: Re: BUG: Protocol 3.0 ErrorResponse: Last 'null' characterseems odd