Re: XML ouput for psql - Mailing list pgsql-patches

From Sean Chittenden
Subject Re: XML ouput for psql
Date
Msg-id 20030530202028.GQ62688@perrin.int.nxad.com
Whole thread Raw
In response to Re: XML ouput for psql  (greg@turnstep.com)
Responses Re: XML ouput for psql  (Hannu Krosing <hannu@tm.ee>)
List pgsql-patches
> > I assume we are not moving in the XML/psql direction, right?  We
> > want it int he backend, or the psql HTML converted to XHTML?
>
> I don't think a consensus was ever reached. It would certainly be
> better if this was done on the backend, but that seems to be a long
> time away, and some have argued that it is not the job of the engine
> to do this anyway.

Few points for the archives regarding XML and databases (spent 9mo
working on this kinda stuff during the .com days):

*) Use libxml2.  MIT Licensed, most complete opensource XML
   implementation available, and fast.  See the XML benchmarks on
   sf.net for details.  To avoid library naming conflicts, the library
   should likely be renamed to pgxml.so and imported into the src
   tree.  Mention java in this context and risk being clubbed to death.

*) There should be two storage formats for XML data:

   a) DOM-esque storage: broken down xmlNodes.  This is necessary for
      indexing specific places in documents (ala XPath queries).
      Actual datums on the disk should be similar in structure to the
      xmlNode struct found in libxml2 (would help with the
      serialization in either direction).  In database xslt
      transformations are also possible with the data stored this way.

   b) SAX-esque storage: basically a single BYTEA/TEXT column.  Not
      all documents need to be indexed/searchable and SAX processing
      of data is generally more efficient if you don't know what
      you're looking for.  This format is the low hanging fruit
      though.

-sc

--
Sean Chittenden

pgsql-patches by date:

Previous
From: greg@turnstep.com
Date:
Subject: Re: XML ouput for psql
Next
From: Bruce Momjian
Date:
Subject: Re: FK on update no action patch