Re: XML type in PostgreSQL 8.3

From: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: XML type in PostgreSQL 8.3
Date: 2007-01-24 15:45:33
Message-ID: 1169653533.8706.19.camel@archimedes
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tobias Thierer 2007-01-25 23:34:31 escape string for pgsql (using jdbc/java)?
Previous Message Peter Eisentraut 2007-01-24 15:44:14 Re: XML type in PostgreSQL 8.3