Thread: XML type in PostgreSQL 8.3

XML type in PostgreSQL 8.3

From
Peter Eisentraut
Date:
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/

Re: XML type in PostgreSQL 8.3

From
Dave Cramer
Date:
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
>


Re: XML type in PostgreSQL 8.3

From
Peter Eisentraut
Date:
Dave Cramer wrote:
> A quick perusal of the docs suggests that this is really just a
> stream wrapper, much like binary data.
>
> Am I missing anything ?

There is also a bit of integration with the javax.xml.* stuff in the
getSource() and setResult() methods, but other than that it should be
straightforward.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: XML type in PostgreSQL 8.3

From
Mark Lewis
Date:
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