Re: XML Support related questions - Mailing list pgsql-general

From Craig Ringer
Subject Re: XML Support related questions
Date
Msg-id 483730C1.2090308@postnewspapers.com.au
Whole thread Raw
In response to XML Support related questions  ("Brijesh Shrivastav" <Bshrivastav@esri.com>)
List pgsql-general
Brijesh Shrivastav wrote:

> 1)      Can xml column be constrained to be DOCUMENT or CONTENT type?
>
> XMLPARSE/XMLSERIALIZE functions allows to set XML option DOCUMENT or
> CONTENT type. Can we do the same when defining an xml column level?

Maybe this could be done with a PL trigger ? Ideally you'd do it with a
domain type of XML so you could make domains like "XHTML", but as
PostgreSQL doesn't support adding triggers as part of a domain type
that's not going to work well.

It'd fit in fairly well with the next point:

> 2)      Is there plan in near future to support XML schema validation
> i.e to ensure inserted xml document conforms to a preregistered set of
> XML schemas.

This seems like a reasonable thing to tackle with PL/Perl, PL/Python,
etc. It's a pity PL/Java doesn't get the same level of attention
(especially from Linux distros) as Java's XML support is excellent and
it would be an ideal fit.

With Java going GPL and soon all-GPL with no binary only bits, maybe
PL/Java will start getting more interest from the free software crowd.

> 4)      Support for xml indexes - Is it something that is being worked
> upon for next release?

How would you index an XML document - by an XQuery result?

Maybe GiST can be used to build an XML index. That might be an
interesting SoC project.

You may also want to read this:


http://209.85.141.104/search?q=cache:mzlb8WfZ2eIJ:www.pgcon.org/2007/schedule/attachments/16-xml_in_postgresql.ps+postgresql+gist+xml&hl=en&ct=clnk&cd=1&gl=au&client=firefox-a

(early hit in a search for `postgresql gist xml')

--
Craig Ringer

pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Schema migration tools?
Next
From: Howard Cole
Date:
Subject: Re: Error: Could not open relation...