Skip site navigation (1) Skip section navigation (2)

New XML section for documentation

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, PostgreSQL-documentation <pgsql-docs(at)postgreSQL(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: New XML section for documentation
Date: 2006-08-25 23:46:57
Message-ID: (view raw or whole thread)
Lists: pgsql-docspgsql-hackers
Here is an new XML section for our SGML documentation.  It explains the
various XML capabilities, if we support them, and how to use them.



XML Document Support
XML support is not one capability, but a variety of features supported
by a database.  These capabilities include storage, import/export,
validation, indexing, efficiency of modification,  searching,
transformating, and XML to SQL mapping.  PostgreSQL supports some but
not all of these XML capabilities.  Future releases of PostgreSQL will
continue to improve XML support.

PostgreSQL stores XML documents as ordinary text documents.  It does not
split apart XML documents into its component parts and store each
element separately.  You can use middle-ware solutions to do that, but
once done, the data becomes relational and has to be processed

Because XML documents are stored as normal text documents, they can be
imported/exported with little complexity.  A simple TEXT field can hold
up to 1 gigabyte of text, and large objects are available for larger

/contrib/xml2 has a function called xml_valid() that can be used in
a CHECK constraint to enforce that a field contains valid XML.  It
does not support validation against a specific XML schema.  A
server-side language with XML capabilities could be used to do
schema-specific XML checks.

Because XML documents are stored as text, full-text indexing tool
/contrib/tsearch2 can be used to index XML documents.  Of course, the
searches are text searches, with no XML awareness, but tsearch2 can be
used with other XML capabilities to dramatically reduce the amount of
data processed at the XML level.

If an UPDATE does not modify an XML field, the XML data is shared
between the old and new rows.  However, if the UPDATE modifies a XML
field, a full modified copy of the XML field must be created internally.

XPath searches are implemented using /contrib/xml2.  It processes XML
text documents and returns results based on the requested query.

/contrib/xml2 supports XSL transformations.

XML to SQL Mapping
This involves converting XML data to and from relational structures. 
PostgreSQL has no internal support for such mapping, and relies on
external tools to do such conversions.

Missing Features
	o  XQuery
	o  SQL/XML syntax (ISO/IEC 9075-14)
	o  XML data type optimized for XML storage

See also

  Bruce Momjian   bruce(at)momjian(dot)us

  + If your life is a hard drive, Christ can be your backup. +


pgsql-docs by date

Next:From: David FetterDate: 2006-08-26 00:24:22
Subject: Re: [HACKERS] New XML section for documentation
Previous:From: Markus SchiltknechtDate: 2006-08-21 13:47:09
Subject: Replication Documentation

pgsql-hackers by date

Next:From: David FetterDate: 2006-08-26 00:24:22
Subject: Re: [HACKERS] New XML section for documentation
Previous:From: Alvaro HerreraDate: 2006-08-25 18:53:59
Subject: Re: [GENERAL] invalid byte sequence ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group