PreparedStatement setObject - Mailing list pgsql-bugs

From Kobus Walters
Subject PreparedStatement setObject
Date
Msg-id 4D5BA04438D6FE4A9437F57B6AB87B4701273F9B@hermes.iveri.com
Whole thread Raw
Responses Re: PreparedStatement setObject  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-bugs
Setting java.lang.String values with the setObject method in version 8 of t=
he pgsql-jdbc driver (postgresql-8.0-310.jdbc3.jar) does not work as with v=
ersion 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 instan=
ce. In version 7 this gets executed as "select localtimestamp - time '00:00=
:00'", while version 8 try to execute it as "select localtimestamp - time 0=
0:00:00", which of cause fails since the quotes are missing.

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #1422: ODBC SQLTables SQL_ALL_TABLE_TYPES no resultset
Next
From: "Marcel Claus"
Date:
Subject: BUG #1477: DROP TABLE does not recover