JDBC 3.0 / JDK 1.4 build issues - Mailing list pgsql-jdbc

From Rene Pijlman
Subject JDBC 3.0 / JDK 1.4 build issues
Date
Msg-id BEELJGLKPCMDGFENPBPNCEJDDNAA.rene@lab.applinet.nl
Whole thread Raw
Responses Re: JDBC 3.0 / JDK 1.4 build issues
List pgsql-jdbc
I'm working on a patch which enables the driver to compile with JDBC 3.0 /
JDK 1.4 (currently beta-3). Basically we need to add a few methods and throw
"not implemented" in most of them.

Unfortunately, when the driver is modified to compile with JDK 1.4, it won't
compile with JDK 1.3 and older. There are at least two reasons for this:

1) Connection must implement the new method setSavePoint(), which returns a
new type java.sql.Savepoint

See:
http://java.sun.com/j2se/1.4/docs/api/java/sql/Connection.html#setSavepoint(
)
http://java.sun.com/j2se/1.4/docs/api/java/sql/Savepoint.html

2) PreparedStatement must implement the new method getParameterMetaData(),
which returns a new type java.sql.ParameterMetaData

See:
http://java.sun.com/j2se/1.4/docs/api/java/sql/PreparedStatement.html#getPar
ameterMetaData()
http://java.sun.com/j2se/1.4/docs/api/java/sql/ParameterMetaData.html

I think its very undesirable to fork the entire jdbc2 driver, just to be
able to add a couple of methods which throw "not implemented". In fact, I
find the current situation with jdbc1/jdbc2 too cumbersome already. It seems
the only alternative is some sort of conditional compilation using make or
ant. Any ideas?

In case someone wants to have a look, I've attached a patch which makes the
driver in current CVS compile with JDK 1.4b3. With this patch applied, the
driver _won't_ compile with JDK 1.3.x and older. Use at own risk :-)

Cheers,
René Pijlman <rene@lab.applinet.nl>

Attachment

pgsql-jdbc by date:

Previous
From: Antonio Fiol Bonnín
Date:
Subject: Re: Bug with caching SQLTypes in Connection:getSQLType(oid)
Next
From: "Thomas O'Dowd"
Date:
Subject: Re: patch against cvs for getTimestamp() problem.