PreparedStatement setObject

From: "Kobus Walters" <kobus(at)iveri(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: PreparedStatement setObject
Date: 2005-02-11 11:24:29
Message-ID: 4D5BA04438D6FE4A9437F57B6AB87B4701273F9B@hermes.iveri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Setting java.lang.String values with the setObject method in version 8 of the pgsql-jdbc driver (postgresql-8.0-310.jdbc3.jar) does not work as with version 7 (pg74.215.jdbc3.jar) of the driver. Example:

Create a prepared statement with sql "select localtimestamp - time ?". Call setObject(1, java.lang.String) with the String value "00:00:00" for instance. In version 7 this gets executed as "select localtimestamp - time '00:00:00'", while version 8 try to execute it as "select localtimestamp - time 00:00:00", which of cause fails since the quotes are missing.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2005-02-11 11:54:18 Re: BUG #1466: #maintenace_work_mem = 16384
Previous Message Neil Conway 2005-02-11 10:57:24 Re: BUG #1473: Backend bus error, possibly due to ANALYZE