@@ -822,21 +822,25 @@ CREATE VIEW xmlview6 AS SELECT xmlpi(name foo, 'bar');
822
822
CREATE VIEW xmlview7 AS SELECT xmlroot(xml '<foo/>', version no value, standalone yes);
823
823
CREATE VIEW xmlview8 AS SELECT xmlserialize(content 'good' as char(10));
824
824
CREATE VIEW xmlview9 AS SELECT xmlserialize(content 'good' as text);
825
+ CREATE VIEW xmlview10 AS SELECT xmlserialize(document '<foo><bar>42</bar></foo>' AS text indent);
826
+ CREATE VIEW xmlview11 AS SELECT xmlserialize(document '<foo><bar>42</bar></foo>' AS character varying no indent);
825
827
SELECT table_name, view_definition FROM information_schema.views
826
828
WHERE table_name LIKE 'xmlview%' ORDER BY 1;
827
- table_name | view_definition
828
- ------------+------------------------------------------------------------------------------------------------------------
829
+ table_name | view_definition
830
+ ------------+---------------------------------------------------------------------------------------------------------------------------------------
829
831
xmlview1 | SELECT xmlcomment('test'::text) AS xmlcomment;
832
+ xmlview10 | SELECT XMLSERIALIZE(DOCUMENT '<foo><bar>42</bar></foo>'::xml AS text INDENT) AS "xmlserialize";
833
+ xmlview11 | SELECT (XMLSERIALIZE(DOCUMENT '<foo><bar>42</bar></foo>'::xml AS character varying NO INDENT))::character varying AS "xmlserialize";
830
834
xmlview2 | SELECT XMLCONCAT('hello'::xml, 'you'::xml) AS "xmlconcat";
831
835
xmlview3 | SELECT XMLELEMENT(NAME element, XMLATTRIBUTES(1 AS ":one:", 'deuce' AS two), 'content&') AS "xmlelement";
832
- xmlview4 | SELECT XMLELEMENT(NAME employee, XMLFOREST(name AS name, age AS age, salary AS pay)) AS "xmlelement" +
836
+ xmlview4 | SELECT XMLELEMENT(NAME employee, XMLFOREST(name AS name, age AS age, salary AS pay)) AS "xmlelement" +
833
837
| FROM emp;
834
838
xmlview5 | SELECT XMLPARSE(CONTENT '<abc>x</abc>'::text STRIP WHITESPACE) AS "xmlparse";
835
839
xmlview6 | SELECT XMLPI(NAME foo, 'bar'::text) AS "xmlpi";
836
840
xmlview7 | SELECT XMLROOT('<foo/>'::xml, VERSION NO VALUE, STANDALONE YES) AS "xmlroot";
837
- xmlview8 | SELECT (XMLSERIALIZE(CONTENT 'good'::xml AS character(10)))::character(10) AS "xmlserialize";
838
- xmlview9 | SELECT XMLSERIALIZE(CONTENT 'good'::xml AS text) AS "xmlserialize";
839
- (9 rows)
841
+ xmlview8 | SELECT (XMLSERIALIZE(CONTENT 'good'::xml AS character(10) NO INDENT ))::character(10) AS "xmlserialize";
842
+ xmlview9 | SELECT XMLSERIALIZE(CONTENT 'good'::xml AS text NO INDENT ) AS "xmlserialize";
843
+ (11 rows)
840
844
841
845
-- Text XPath expressions evaluation
842
846
SELECT xpath('/value', data) FROM xmltest;
0 commit comments