Support for SQLInput / SQLOutput

From: Lukas Eder <lukas(dot)eder(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Support for SQLInput / SQLOutput
Date: 2010-12-19 13:46:28
Message-ID: c25227bd-3261-408a-b1ff-43cad270fbc1@32g2000yqz.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Support for UDTs is one of the essential features in jOOQ (http://
jooq.sourceforge.net), a database interfacing library on top of JDBC.
JDBC expects client code to provide a type mapping in methods such as
ResultSet.getObject(int, Map), see also
http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getObject(java.lang.String,%20java.util.Map)

Now this is currently not supported by the Postgres JDBC driver.
Instead, calls to ResultSet.getObject(int) are encouraged and a
org.postgresql.util.PGobject holding a serialised version of the UDT
record is returned.

In jOOQ, I don't want to create a dependency on this object. Instead,
I call #toString() on it and parse it using my PGobjectParser:
http://jooq.svn.sourceforge.net/viewvc/jooq/jOOQ/src/org/jooq/util/postgres/PGobjectParser.java?view=markup
(this might be a nice addition for the JDBC driver)

Now, I can see on the TODO list (http://jdbc.postgresql.org/
todo.html#Compliance), that proper SQLInput / SQLOutput support is
planned. My questions are these:

1. Has a timeline for this already been fixed?
2. Will the new JDBC driver be backwards-compatible? I.e. if no
mapping is provided to ResultSet#getObject(), will the driver still
return a PGobject?

Cheers
Lukas Eder

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rajesh Sundar 2010-12-21 11:33:23 DBLink delete record in other database
Previous Message Dave Cramer 2010-12-10 13:58:05 Re: Connection Problem