Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b75afd

Browse files
committed
Mapping schemas and databases to XML and XML Schema.
Refactor and document the remaining mapping code.
1 parentae8072a commit0b75afd

File tree

4 files changed

+713
-87
lines changed

4 files changed

+713
-87
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.371 2007/03/25 11:56:01 ishii Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.372 2007/04/01 09:00:24 petere Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -11427,7 +11427,7 @@ cursor_to_xml(cursor refcursor, count int, nulls boolean, tableforest boolean, t
1142711427
query whose text is passed as parameter
1142811428
<parameter>query</parameter> and maps the result set.
1142911429
<function>cursor_to_xml</function> fetches the indicated number of
11430-
rows from the cursorspecificed by the parameter
11430+
rows from the cursorspecified by the parameter
1143111431
<parameter>cursor</parameter>. This variant is recommendable if
1143211432
large tables have to be mapped, because the result value is built
1143311433
up in memory by each function.
@@ -11492,7 +11492,7 @@ cursor_to_xml(cursor refcursor, count int, nulls boolean, tableforest boolean, t
1149211492
values should be included in the output. If true, null values in
1149311493
columns are represented as
1149411494
<screen><![CDATA[
11495-
<columname xsi:nil="true"/>
11495+
<columnname xsi:nil="true"/>
1149611496
]]></screen>
1149711497
where <literal>xsi</literal> is the XML namespace prefix for XML
1149811498
Schema Instance. An appropriate namespace declaration will be
@@ -11530,6 +11530,65 @@ query_to_xml_and_xmlschema(query text, nulls boolean, tableforest boolean, targe
1153011530
</synopsis>
1153111531
</para>
1153211532

11533+
<para>
11534+
In addition, the following functions are available to produce
11535+
analogous mappings of entire schemas or the entire current
11536+
database.
11537+
<synopsis>
11538+
schema_to_xml(schema name, nulls boolean, tableforest boolean, targetns text)
11539+
schema_to_xmlschema(schema name, nulls boolean, tableforest boolean, targetns text)
11540+
schema_to_xml_and_xmlschema(schema name, nulls boolean, tableforest boolean, targetns text)
11541+
11542+
database_to_xml(nulls boolean, tableforest boolean, targetns text)
11543+
database_to_xmlschema(nulls boolean, tableforest boolean, targetns text)
11544+
database_to_xml_and_xmlschema(nulls boolean, tableforest boolean, targetns text)
11545+
</synopsis>
11546+
11547+
Note that these potentially produce a lot of data, which needs to
11548+
be built up in memory. When requesting content mappings of large
11549+
schemas or databases, it may be worthwhile to consider mapping the
11550+
tables separately instead, possibly even through a cursor.
11551+
</para>
11552+
11553+
<para>
11554+
The result of a schema content mapping looks like this:
11555+
11556+
<screen><![CDATA[
11557+
<schemaname>
11558+
11559+
table1-mapping
11560+
11561+
table2-mapping
11562+
11563+
...
11564+
11565+
</schemaname>]]></screen>
11566+
11567+
where the format of a table mapping depends on the
11568+
<parameter>tableforest</parameter> parameter as explained above.
11569+
</para>
11570+
11571+
<para>
11572+
The result of a database content mapping looks like this:
11573+
11574+
<screen><![CDATA[
11575+
<dbname>
11576+
11577+
<schema1name>
11578+
...
11579+
</schema1name>
11580+
11581+
<schema2name>
11582+
...
11583+
</schema2name>
11584+
11585+
...
11586+
11587+
</dbname>]]></screen>
11588+
11589+
where the schema mapping is as above.
11590+
</para>
11591+
1153311592
<para>
1153411593
As an example for using the output produced by these functions,
1153511594
<xref linkend="xslt-xml-html"> shows an XSLT stylesheet that

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp