Skip site navigation (1) Skip section navigation (2)

8.0.3 parse errors where 7.x was ok

From: Nick Johnson <pgsql(at)spatula(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: 8.0.3 parse errors where 7.x was ok
Date: 2005-08-09 23:53:40
Message-ID: 20050809164256.D7871@turing.morons.org (view raw or flat)
Thread:
Lists: pgsql-jdbc
I'm getting a new exception when upgrading to Postgres 8.0.3 with the JDBC 
drivers it builds:

java.sql.SQLException: ERROR: parse error at or near "$1"

This is happening with the following bit of code:

     105         try {
     106             s = c.prepareStatement("select now() - interval ?");
     107             s.setString(1, "7 days");
     108             ResultSet r = s.executeQuery();

The driver was built from postgresql-jdbc-8.0-311.src using the FreeBSD 
port on FreeBSD 5.4 with Java 1.4.2-p7.

Using the older jar built for postgresql-7.3.4 works fine.

Is this syntax no longer supported?

    Nick

-- 
"The aptly-named morons.org is an obscenity-laced screed..."
 	-- Robert P. Lockwood, Catholic League director of research
Nick Johnson, version 2.1                             http://web.morons.org/

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2005-08-10 00:05:09
Subject: Re: 8.0.3 parse errors where 7.x was ok
Previous:From: Kris JurkaDate: 2005-08-09 23:35:32
Subject: Re: Missing functionality in ResultSetMetaData ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group