XML export function signatures

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема XML export function signatures
Дата
Msg-id 200702122019.00207.peter_e@gmx.net
обсуждение исходный текст
Ответы Re: XML export function signatures  (Andrew Dunstan <andrew@dunslane.net>)
Список 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/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: Missing directory when building 8.2.3-base
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: XML export function signatures