Re: XML type in PostgreSQL 8.3 - Mailing list pgsql-jdbc

From Mark Lewis
Subject Re: XML type in PostgreSQL 8.3
Date
Msg-id 1169653533.8706.19.camel@archimedes
Whole thread Raw
In response to Re: XML type in PostgreSQL 8.3  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
The JDBC docs support a stream wrapper interface, but also support a
Source interface, which is recommended for performance reasons because
databases which have an optimized XML representation may be able to more
efficiently create a Java DOM directly than by converting to XML and
parsing the resulting stream.

Since the PG XML data type seems to just be some syntactic sugar around
the text data type, we won't have an optimized XML representation and so
the driver support would probably just use the stream methods natively
and implement simple wrappers for the Source interfaces.

-- Mark Lewis

On Wed, 2007-01-24 at 10:20 -0500, Dave Cramer wrote:
> Peter.
>
> A quick perusal of the docs suggests that this is really just a
> stream wrapper, much like binary data.
>
> Am I missing anything ?
> On 24-Jan-07, at 9:37 AM, Peter Eisentraut wrote:
>
> > PostgreSQL 8.3 will come with a native xml type and support functions.
> > It would be nice if the JDBC driver could also make the appropriate
> > additions for handling this type.  Java 6 adds the java.sql.SQLXML
> > interface to encapsulate values of that type, along with
> > ResultSet.getSQLXML and so on.  Documentation is here:
> >
> > http://java.sun.com/javase/6/docs/api/java/sql/SQLXML.html
> >
> > The xml type in PostgreSQL CVS head should be fully functional to the
> > extent that one would need for developing this support.  Initial
> > documentation is here:
> >
> > http://developer.postgresql.org/pgdocs/postgres/datatype-xml.html
> >
> > Maybe someone wants to tackle this, or at least make a note of it for
> > the future.  Let me know how I can help.
> >
> > --
> > Peter Eisentraut
> > http://developer.postgresql.org/~petere/
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 4: Have you searched our list archives?
> >
> >                http://archives.postgresql.org
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

pgsql-jdbc by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: XML type in PostgreSQL 8.3
Next
From: Tobias Thierer
Date:
Subject: escape string for pgsql (using jdbc/java)?