Peter Eisentraut wrote:
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.




Looks fairly sound.

. table_to_xml_and_xmlschema  seems like a mouthful - can we shorten it a bit?

. what are the two ways of representing data that tableforest distinguishes?

. can we have versions that supply defaults for params after the first?


cheers

andrew





---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to