BUG #4110: Error on select doing (date +1)

From: "Josep Llort" <Jllort(at)git(dot)es>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4110: Error on select doing (date +1)
Date: 2008-04-17 06:54:42
Message-ID: 200804170654.m3H6sgTg099129@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4110
Logged by: Josep Llort
Email address: Jllort(at)git(dot)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"

Browse pgsql-bugs by date

  From Date Subject
Next Message Eugen.Konkov 2008-04-17 10:01:42 Re: BUG: Protocol 3.0 ErrorResponse: Last 'null' characterseems odd
Previous Message Fujii Masao 2008-04-17 04:39:38 Re: BUG #4109: Typo in documentation