From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | XML export function signatures |
Date: | 2007-02-12 19:18:59 |
Message-ID: | 200702122019.00207.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here are the proposed signatures for the XML export functions.
While I have seen the output formats in use elsewhere, I could not find
any useful information on how to invoke these mappings, so the
following is purely my own invention.
table_to_xml(tbl regclass, nulls boolean, tableforest boolean, targetns text) RETURNS xml
query_to_xml(query text, nulls boolean, tableforest boolean, targetns text) RETURNS xml
table_to_xmlschema(tbl regclass, nulls boolean, tableforest boolean, targetns text) RETURNS xml
query_to_xmlschema(query text, nulls boolean, tableforest boolean, targetns text) RETURNS xml
table_to_xml_and_xmlschema(tbl regclass, nulls boolean, tableforest boolean, targetns text) RETURNS xml
query_to_xml_and_xmlschema(query text, nulls boolean, tableforest boolean, targetns text) RETURNS xml
cursor_get_xml(cursor refcursor, count int, nulls boolean, tableforest boolean, targetns text) RETURNS xml
cursor_to_xmlschema(cursor refcursor, nulls boolean, tableforest boolean, targetns text) RETURNS xml
The table_* variants export named tables, and the output will have some
degree of catalog information about the tables, which will have to be
omitted for the query_* variants. The cursor_* variants exist for
supporting the export of large structures.
*_to_xml gives you the data, *_to_xmlschema the associated XML Schema
document, and *_to_xml_and_xmlschema gives you both in one XML document
and linked together.
The argument "nulls" specifies whether to include null values,
"tableforest" switches between two alternative ways of
representing the data, and "targetns" is the target (XML)
namespace.
Comments?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2007-02-12 19:45:06 | Re: XML export function signatures |
Previous Message | Jeroen T. Vermeulen | 2007-02-12 18:57:43 | Re: Missing directory when building 8.2.3-base |