Thread: xml2 still essential for us

xml2 still essential for us

From
"J. Greg Davidson"
Date:
Reporting as requested, there are two things our projects
continue to need xml2 for, and a third which we conceptually
need xml2 for:

(1) We need some way to do xslt processing.

(2) We need the equivalent of xml_is_well_formed(text), e.g.
a documented way to call XMLPARSE speculatively and get a
NULL or be able to efficiently catch an error, etc.

(3) My third point is a bit subtle.  The xml2 package is
clearly just a set of operations on text.  The PostgreSQL
xml datatype might RIGHT NOW be internally represented as
text, but I don't think we're supposed to think of it that
way.

The official XML datatype is free to evolve into one of
the more sophisticated XML storage and processing formats,
at the expense of a bit more overhead at XMLPARSE time.

The advantage of the xml2 package is that it says upfront:
this is just a way to treat text as xml.  It is useful
precisely when one is doing a mixture of text and xml
processing steps on data, and perhaps also when generating
short-lived xml values. 

(4) In conclusion, I hope that PostgreSQL will keep xml2
or something similar even when the XSLT and speculative parsing
issues have been addressed.

Thanks for your consideration,

_Greg

J. Greg Davidson



Re: xml2 still essential for us

From
Tom Lane
Date:
"J. Greg Davidson" <greg@ngender.net> writes:
> (4) In conclusion, I hope that PostgreSQL will keep xml2
> or something similar even when the XSLT and speculative parsing
> issues have been addressed.

Are you sufficiently excited about it to fix its memory management
issues?
http://archives.postgresql.org/message-id/4A6A276A.6090405@dunslane.net
http://archives.postgresql.org/pgsql-bugs/2009-09/msg00359.php

If we're going to keep it, it needs significant work.
        regards, tom lane


Re: xml2 still essential for us

From
Josh Berkus
Date:
> (4) In conclusion, I hope that PostgreSQL will keep xml2
> or something similar even when the XSLT and speculative parsing
> issues have been addressed.

Given your interest in XML2, would you like to be come a maintainer of
the module?

--Josh Berkus


Re: xml2 still essential for us

From
"J. Greg Davidson"
Date:
On Wed, 2010-01-13 at 00:34 -0500, Tom Lane wrote:
> Are you sufficiently excited about it to fix its memory management
> issues?
On Wed, 2010-01-13 at 09:12 -0800, Josh Berkus wrote:
> Given your interest in XML2, would you like to be come a maintainer of
> the module?

I'm wonderfully flattered by these requests.  At the moment I'm more
than a year behind my schedule for the PostgreSQL-based system I'm
currently developing!  When that's been released (as Free Software,
etc.) I will certainly be looking for how I can contribute back to the
PostgreSQL project.

One of my challenges has been the poverty of the documented Server
Programming API - which existing extensions seem to casually disregard
in favor of using all kinds of undocumented features like direct
function calls and caching - all of which I avoided because I  want my
extensions to work in future PostgreSQL versions.  I'm imagining that
some of these mechanisms could be added to the documented API - that's a
task which I could help with.

When I release my code I want to contribute back first by helping with
things which made my project unnecessarily difficult.  I hope that
PostgreSQL's XML is in great shape by then, but we'll see!

PostgreSQL is a great tool and y'all are doing great work in maintaining
and improving it.  The community has also been very helpful since I got
over my shyness about asking for help.

_Greg

J. Greg Davidson
Ancient Mariner of the C