From: | "Reuben Pasquini" <pasquini(at)imageworks(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2036: 8.1 JDBC busted date with INTERVAL update |
Date: | 2005-11-11 02:26:55 |
Message-ID: | 20051111022655.00461F0F61@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 2036
Logged by: Reuben Pasquini
Email address: pasquini(at)imageworks(dot)com
PostgreSQL version: 8.1
Operating system: linux
Description: 8.1 JDBC busted date with INTERVAL update
Details:
Hello!
Something like this would work with the postgres-7.4
jdbc3.jar driver, but fails with the shown error with
postgres-8.1 jdbc3.jar driver.
Running with a non-prepared statement works
with 8.1.
I'm running 8.1 server on linux, jdk1.5.
Not sure if this is a bug, or intentional.
Thanks for the great work!
Reuben
----------
s_query = "UPDATE cue.proc SET dt_started = now() - INTERVAL ? WHERE pk=5";
x_stmt = x_conn.prepareStatement ( s_query );
x_stmt.setString ( 1, "0 seconds" );
x_stmt.executeUpdate ();
------------
org.postgresql.util.PSQLException: ERROR: syntax error at or near "$1"
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorI
mpl.java:1512)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.ja
va:1297)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j
ava:430)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2St
atement.java:346)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2State
ment.java:300)
at spijava.cue.CuProcUpdateCommand.doItSimple(CuProcUpdateCommand.java:224)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom | 2005-11-11 21:26:47 | BUG #2037: user function call unexpected "input out of range" |
Previous Message | Raul Silva | 2005-11-10 16:20:07 | BUG #2035: template1 |