XML functions

The XML functions that Netezza Performance Server provides as extensions to the SQL language are modeled after the SQL/XML specification in SQL:2003.

The SQL/XML specification defines ways of importing and storing XML data in an SQL database, manipulating it within the database, and publishing both XML and conventional SQL data in XML form.

Publishing conventional SQL data in XML form transforms the flat (non-hierarchical) result sets of SQL queries into hierarchically structured XML data. One important use of this transformation is to make this data available through web services. The functions that you can use to publish SQL data in XML format are XMLRoot(), XMLElement(), XMLConcat(), XMLAgg(), and XMLAttributes().

You can query, manipulate, and update data that is already stored in a database as XML by using functions such as XMLExistsNode, XMLExtract(), XMLExtractValue(), and XMLUpdate(). Because XML data consists of a tree of nodes, these functions rely on W3C XPath expressions to locate individual XML nodes within the tree.

Important: Netezza Performance Server user-defined functions (UDFs) do not support certain features of the SQL:2003 SQL/XML specification, including the ability to pass column names into functions and the ability to construct sets.

When you process user groups by using SQL Extensions toolkit, it is recommended to keep the number of users in a group up to 1100 to avoid Error: 0 : XML: Buffer Overflow issue.

For more information about industry standards for SQL extensions, see ISO/IEC 9075-14.