pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Lewis <mark.lewis@mir3.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: XML type in PostgreSQL 8.3
Date: Wed, 24 Jan 2007 07:45:33 -0800
Message-ID: <1169653533.8706.19.camel@archimedes> (raw)
In-Reply-To: <6885E95C-12FC-4607-B738-B703A7344579@fastcrypt.com>
References: <200701241537.01933.peter_e@gmx.net>
	<6885E95C-12FC-4607-B738-B703A7344579@fastcrypt.com>

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



view thread (4+ messages)

Message-ID: <1169653533.8706.19.camel@archimedes>
Permalink:  ../1169653533.8706.19.camel@archimedes/
Also on:    postgresql.org/message-id/1169653533.8706.19.camel@archimedes

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mark.lewis@mir3.com, pg@fastcrypt.com, peter_e@gmx.net
  Subject: Re: XML type in PostgreSQL 8.3
  In-Reply-To: <1169653533.8706.19.camel@archimedes>
  References: <200701241537.01933.peter_e@gmx.net> <6885E95C-12FC-4607-B738-B703A7344579@fastcrypt.com> <1169653533.8706.19.camel@archimedes>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox