{"Entry":{"collection":"func","key":"query-to-xml","name":"query_to_xml","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.3"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"13","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"14"}],"content_hash":"acf60f61229bf421c99d82ca4e826fb9cfd892d95c78df159cdbeb3bf602b1f3","first_version":"8.3","group":"xml","group_label":"Xml Functions","groups":["xml"],"imported_at":"2026-09-27T17:57:28.764856+08:00","last_version":"20","name":"query_to_xml","name_key":"query_to_xml","position":15005,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"query_to_xml ( query text, nulls boolean, tableforest boolean, targetns text ) → xml","signature_count":1,"slug":"query-to-xml","source_rev":"b7bd9cda","summary":"table_to_xml maps the content of the named table, passed as parameter table.","summary_zh":""}},"Definition":{"Collection":"func","Key":"query-to-xml","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"query-to-xml","SourceRevision":"b7bd9cda","Facts":{"description":"table_to_xml maps the content of the named table, passed as parameter table. The regclass type accepts strings identifying tables using the usual notation, including optional schema qualification and double quotes (see Section 8.19 for details). query_to_xml executes the query whose text is passed as parameter query and maps the result set. cursor_to_xml fetches the indicated number of rows from the cursor specified by the parameter cursor. This variant is recommended if large tables have to be mapped, because the result value is built up in memory by each function.","description_html":"\u003ccode class=\"function\"\u003etable_to_xml\u003c/code\u003e maps the content of the named table, passed as parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e. The \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e type accepts strings identifying tables using the usual notation, including optional schema qualification and double quotes (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e for details). \u003ccode class=\"function\"\u003equery_to_xml\u003c/code\u003e executes the query whose text is passed as parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e and maps the result set. \u003ccode class=\"function\"\u003ecursor_to_xml\u003c/code\u003e fetches the indicated number of rows from the cursor specified by the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003ecursor\u003c/code\u003e\u003c/em\u003e. This variant is recommended if large tables have to be mapped, because the result value is built up in memory by each function.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-XML-MAPPING","file":"functions-xml.html","slug":"18"},"group":"xml","group_label":"Xml Functions","lang":"en","layout":"table-new","pages":["functions-xml.html"],"prose_only":false,"signatures":[{"description":"table_to_xml maps the content of the named table, passed as parameter table. The regclass type accepts strings identifying tables using the usual notation, including optional schema qualification and double quotes (see Section 8.19 for details). query_to_xml executes the query whose text is passed as parameter query and maps the result set. cursor_to_xml fetches the indicated number of rows from the cursor specified by the parameter cursor. This variant is recommended if large tables have to be mapped, because the result value is built up in memory by each function.","description_html":"\u003ccode class=\"function\"\u003etable_to_xml\u003c/code\u003e maps the content of the named table, passed as parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e. The \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e type accepts strings identifying tables using the usual notation, including optional schema qualification and double quotes (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e for details). \u003ccode class=\"function\"\u003equery_to_xml\u003c/code\u003e executes the query whose text is passed as parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e and maps the result set. \u003ccode class=\"function\"\u003ecursor_to_xml\u003c/code\u003e fetches the indicated number of rows from the cursor specified by the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003ecursor\u003c/code\u003e\u003c/em\u003e. This variant is recommended if large tables have to be mapped, because the result value is built up in memory by each function.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003equery_to_xml\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enulls\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etableforest\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etargetns\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003exml\u003c/code\u003e","returns":"xml","text":"query_to_xml ( query text, nulls boolean, tableforest boolean, targetns text ) → xml","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-XML-MAPPING","file":"functions-xml.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"query-to-xml","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"query_to_xml","Summary":"table_to_xml映射由参数table传递的命名表的内容。regclass类型接受使用常见标记标识表的字符串，包括可选的模式限定和双引号（详见第 8.19 节）。query_to_xml执行由参数query传递的查询并且映射结果集。cursor_to_xml从cursor指定的游标中取出指定数量的行。如果需要映射一个大型的表，我们推荐这种变体，因为每一个函数都是在内存中构建结果值的。","BodyHTML":"\u003ccode\u003etable_to_xml\u003c/code\u003e映射由参数\u003cem\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e传递的命名表的内容。\u003ccode\u003eregclass\u003c/code\u003e类型接受使用常见标记标识表的字符串，包括可选的模式限定和双引号（详见\u003ca href=\"/docs/18/datatype-oid.html\" rel=\"nofollow\"\u003e第 8.19 节\u003c/a\u003e）。\u003ccode\u003equery_to_xml\u003c/code\u003e执行由参数\u003cem\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e传递的查询并且映射结果集。\u003ccode\u003ecursor_to_xml\u003c/code\u003e从\u003cem\u003e\u003ccode\u003ecursor\u003c/code\u003e\u003c/em\u003e指定的游标中取出指定数量的行。如果需要映射一个大型的表，我们推荐这种变体，因为每一个函数都是在内存中构建结果值的。\u003cpre\u003equery_to_xml ( query text, nulls boolean, tableforest boolean, targetns text ) → xml\u003c/pre\u003e\u003ccode\u003etable_to_xml\u003c/code\u003e映射由参数\u003cem\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e传递的命名表的内容。\u003ccode\u003eregclass\u003c/code\u003e类型接受使用常见标记标识表的字符串，包括可选的模式限定和双引号（详见\u003ca href=\"/docs/18/datatype-oid.html\" rel=\"nofollow\"\u003e第 8.19 节\u003c/a\u003e）。\u003ccode\u003equery_to_xml\u003c/code\u003e执行由参数\u003cem\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e传递的查询并且映射结果集。\u003ccode\u003ecursor_to_xml\u003c/code\u003e从\u003cem\u003e\u003ccode\u003ecursor\u003c/code\u003e\u003c/em\u003e指定的游标中取出指定数量的行。如果需要映射一个大型的表，我们推荐这种变体，因为每一个函数都是在内存中构建结果值的。","SourceRevision":"ca936764","ContentHash":"fb94da2a8c3df37664a9bff2dff286ffcc04b0e89bd1a32f4fa61dd3312f29cf","Payload":{"description_zh":"table_to_xml映射由参数table传递的命名表的内容。regclass类型接受使用常见标记标识表的字符串，包括可选的模式限定和双引号（详见第 8.19 节）。query_to_xml执行由参数query传递的查询并且映射结果集。cursor_to_xml从cursor指定的游标中取出指定数量的行。如果需要映射一个大型的表，我们推荐这种变体，因为每一个函数都是在内存中构建结果值的。","description_zh_html":"\u003ccode class=\"function\"\u003etable_to_xml\u003c/code\u003e映射由参数\u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e传递的命名表的内容。\u003ccode class=\"type\"\u003eregclass\u003c/code\u003e类型接受使用常见标记标识表的字符串，包括可选的模式限定和双引号（详见\u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. 对象标识符类型\"\u003e第 8.19 节\u003c/a\u003e）。\u003ccode class=\"function\"\u003equery_to_xml\u003c/code\u003e执行由参数\u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e传递的查询并且映射结果集。\u003ccode class=\"function\"\u003ecursor_to_xml\u003c/code\u003e从\u003cem class=\"parameter\"\u003e\u003ccode\u003ecursor\u003c/code\u003e\u003c/em\u003e指定的游标中取出指定数量的行。如果需要映射一个大型的表，我们推荐这种变体，因为每一个函数都是在内存中构建结果值的。","signatures":[{"description_zh":"table_to_xml映射由参数table传递的命名表的内容。regclass类型接受使用常见标记标识表的字符串，包括可选的模式限定和双引号（详见第 8.19 节）。query_to_xml执行由参数query传递的查询并且映射结果集。cursor_to_xml从cursor指定的游标中取出指定数量的行。如果需要映射一个大型的表，我们推荐这种变体，因为每一个函数都是在内存中构建结果值的。","description_zh_html":"\u003ccode class=\"function\"\u003etable_to_xml\u003c/code\u003e映射由参数\u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e传递的命名表的内容。\u003ccode class=\"type\"\u003eregclass\u003c/code\u003e类型接受使用常见标记标识表的字符串，包括可选的模式限定和双引号（详见\u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. 对象标识符类型\"\u003e第 8.19 节\u003c/a\u003e）。\u003ccode class=\"function\"\u003equery_to_xml\u003c/code\u003e执行由参数\u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e传递的查询并且映射结果集。\u003ccode class=\"function\"\u003ecursor_to_xml\u003c/code\u003e从\u003cem class=\"parameter\"\u003e\u003ccode\u003ecursor\u003c/code\u003e\u003c/em\u003e指定的游标中取出指定数量的行。如果需要映射一个大型的表，我们推荐这种变体，因为每一个函数都是在内存中构建结果值的。","returns":"xml","text":"query_to_xml ( query text, nulls boolean, tableforest boolean, targetns text ) → xml","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"b1c6f58c1828696e76c7fb1e1264f4022fc48c477969a07292c2f3aad6631f3d","Text":"query_to_xml ( query text, nulls boolean, tableforest boolean, targetns text ) → xml","Returns":"xml","Payload":{"description":"table_to_xml maps the content of the named table, passed as parameter table. The regclass type accepts strings identifying tables using the usual notation, including optional schema qualification and double quotes (see Section 8.19 for details). query_to_xml executes the query whose text is passed as parameter query and maps the result set. cursor_to_xml fetches the indicated number of rows from the cursor specified by the parameter cursor. This variant is recommended if large tables have to be mapped, because the result value is built up in memory by each function.","description_html":"\u003ccode class=\"function\"\u003etable_to_xml\u003c/code\u003e maps the content of the named table, passed as parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e. The \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e type accepts strings identifying tables using the usual notation, including optional schema qualification and double quotes (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e for details). \u003ccode class=\"function\"\u003equery_to_xml\u003c/code\u003e executes the query whose text is passed as parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e and maps the result set. \u003ccode class=\"function\"\u003ecursor_to_xml\u003c/code\u003e fetches the indicated number of rows from the cursor specified by the parameter \u003cem class=\"parameter\"\u003e\u003ccode\u003ecursor\u003c/code\u003e\u003c/em\u003e. This variant is recommended if large tables have to be mapped, because the result value is built up in memory by each function.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003equery_to_xml\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enulls\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etableforest\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003etargetns\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003exml\u003c/code\u003e","returns":"xml","text":"query_to_xml ( query text, nulls boolean, tableforest boolean, targetns text ) → xml","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
