database_to_xmlschema()

一个返回 database_to_xml() 映射的 XML Schema 的函数

database_to_xmlschema() 是一个系统函数,它返回一个 XML Schema 文档,该文档描述了 database_to_xml() 执行的映射。

database_to_xmlschema() 添加于 PostgreSQL 8.3

用法

database_to_xmlschema ( nulls boolean, tableforest boolean, targetns text )
         → xml

当提供与调用 database_to_xml() 完全相同的参数时,database_to_xmlschema() 将返回相应的 XML Schema 文档。

函数 database_to_xml_and_schema() 结合了这两个函数(database_to_xml() 和 database_to_xmlschema())的输出。

变更历史

示例

database_to_xmlschema() 的基本用法示例

postgres=# SELECT database_to_xmlschema(true, true, '');
                       database_to_xmlschema
--------------------------------------------------------------------
 <xsd:schema                                                       +
     xmlns:xsd="http://www.w3.org/2001/XMLSchema">                 +
                                                                   +
 <xsd:simpleType name="INTEGER">                                   +
   <xsd:restriction base="xsd:int">                                +
     <xsd:maxInclusive value="2147483647"/>                        +
     <xsd:minInclusive value="-2147483648"/>                       +
   </xsd:restriction>                                              +
 </xsd:simpleType>                                                 +
                                                                   +
 <xsd:simpleType name="UDT.postgres.pg_catalog.text">              +
   <xsd:restriction base="xsd:string">                             +
   </xsd:restriction>                                              +
 </xsd:simpleType>                                                 +
                                                                   +
 <xsd:complexType name="CatalogType.postgres">                     +
   <xsd:all>                                                       +
     <xsd:element name="public" type="SchemaType.postgres.public"/>+
   </xsd:all>                                                      +
 </xsd:complexType>                                                +
                                                                   +
 <xsd:element name="postgres" type="CatalogType.postgres"/>        +
                                                                   +
 </xsd:schema>
(1 row)

分类

系统函数, XML

另请参阅

database_to_xml(), database_to_xml_and_xmlschema(), schema_to_xmlschema(), table_to_xmlschema(), query_to_xmlschema() , cursor_to_xmlschema()

反馈

提交对“database_to_xmlschema()”的任何评论、建议或更正请 在此处