]> granicus.if.org Git - postgresql/blob - src/test/regress/expected/xml_1.out
Remove useless whitespace at end of lines
[postgresql] / src / test / regress / expected / xml_1.out
1 CREATE TABLE xmltest (
2     id int,
3     data xml
4 );
5 INSERT INTO xmltest VALUES (1, '<value>one</value>');
6 ERROR:  unsupported XML feature
7 LINE 1: INSERT INTO xmltest VALUES (1, '<value>one</value>');
8                                        ^
9 DETAIL:  This functionality requires the server to be built with libxml support.
10 HINT:  You need to rebuild PostgreSQL using --with-libxml.
11 INSERT INTO xmltest VALUES (2, '<value>two</value>');
12 ERROR:  unsupported XML feature
13 LINE 1: INSERT INTO xmltest VALUES (2, '<value>two</value>');
14                                        ^
15 DETAIL:  This functionality requires the server to be built with libxml support.
16 HINT:  You need to rebuild PostgreSQL using --with-libxml.
17 INSERT INTO xmltest VALUES (3, '<wrong');
18 ERROR:  unsupported XML feature
19 LINE 1: INSERT INTO xmltest VALUES (3, '<wrong');
20                                        ^
21 DETAIL:  This functionality requires the server to be built with libxml support.
22 HINT:  You need to rebuild PostgreSQL using --with-libxml.
23 SELECT * FROM xmltest;
24  id | data 
25 ----+------
26 (0 rows)
27
28 SELECT xmlcomment('test');
29 ERROR:  unsupported XML feature
30 DETAIL:  This functionality requires the server to be built with libxml support.
31 HINT:  You need to rebuild PostgreSQL using --with-libxml.
32 SELECT xmlcomment('-test');
33 ERROR:  unsupported XML feature
34 DETAIL:  This functionality requires the server to be built with libxml support.
35 HINT:  You need to rebuild PostgreSQL using --with-libxml.
36 SELECT xmlcomment('test-');
37 ERROR:  unsupported XML feature
38 DETAIL:  This functionality requires the server to be built with libxml support.
39 HINT:  You need to rebuild PostgreSQL using --with-libxml.
40 SELECT xmlcomment('--test');
41 ERROR:  unsupported XML feature
42 DETAIL:  This functionality requires the server to be built with libxml support.
43 HINT:  You need to rebuild PostgreSQL using --with-libxml.
44 SELECT xmlcomment('te st');
45 ERROR:  unsupported XML feature
46 DETAIL:  This functionality requires the server to be built with libxml support.
47 HINT:  You need to rebuild PostgreSQL using --with-libxml.
48 SELECT xmlconcat(xmlcomment('hello'),
49                  xmlelement(NAME qux, 'foo'),
50                  xmlcomment('world'));
51 ERROR:  unsupported XML feature
52 DETAIL:  This functionality requires the server to be built with libxml support.
53 HINT:  You need to rebuild PostgreSQL using --with-libxml.
54 SELECT xmlconcat('hello', 'you');
55 ERROR:  unsupported XML feature
56 LINE 1: SELECT xmlconcat('hello', 'you');
57                          ^
58 DETAIL:  This functionality requires the server to be built with libxml support.
59 HINT:  You need to rebuild PostgreSQL using --with-libxml.
60 SELECT xmlconcat(1, 2);
61 ERROR:  argument of XMLCONCAT must be type xml, not type integer
62 LINE 1: SELECT xmlconcat(1, 2);
63                          ^
64 SELECT xmlconcat('bad', '<syntax');
65 ERROR:  unsupported XML feature
66 LINE 1: SELECT xmlconcat('bad', '<syntax');
67                          ^
68 DETAIL:  This functionality requires the server to be built with libxml support.
69 HINT:  You need to rebuild PostgreSQL using --with-libxml.
70 SELECT xmlconcat('<foo/>', NULL, '<?xml version="1.1" standalone="no"?><bar/>');
71 ERROR:  unsupported XML feature
72 LINE 1: SELECT xmlconcat('<foo/>', NULL, '<?xml version="1.1" standa...
73                          ^
74 DETAIL:  This functionality requires the server to be built with libxml support.
75 HINT:  You need to rebuild PostgreSQL using --with-libxml.
76 SELECT xmlconcat('<?xml version="1.1"?><foo/>', NULL, '<?xml version="1.1" standalone="no"?><bar/>');
77 ERROR:  unsupported XML feature
78 LINE 1: SELECT xmlconcat('<?xml version="1.1"?><foo/>', NULL, '<?xml...
79                          ^
80 DETAIL:  This functionality requires the server to be built with libxml support.
81 HINT:  You need to rebuild PostgreSQL using --with-libxml.
82 SELECT xmlconcat(NULL);
83  xmlconcat 
84 -----------
85  
86 (1 row)
87
88 SELECT xmlconcat(NULL, NULL);
89  xmlconcat 
90 -----------
91  
92 (1 row)
93
94 SELECT xmlelement(name element,
95                   xmlattributes (1 as one, 'deuce' as two),
96                   'content');
97 ERROR:  unsupported XML feature
98 DETAIL:  This functionality requires the server to be built with libxml support.
99 HINT:  You need to rebuild PostgreSQL using --with-libxml.
100 SELECT xmlelement(name element,
101                   xmlattributes ('unnamed and wrong'));
102 ERROR:  unsupported XML feature
103 DETAIL:  This functionality requires the server to be built with libxml support.
104 HINT:  You need to rebuild PostgreSQL using --with-libxml.
105 SELECT xmlelement(name element, xmlelement(name nested, 'stuff'));
106 ERROR:  unsupported XML feature
107 DETAIL:  This functionality requires the server to be built with libxml support.
108 HINT:  You need to rebuild PostgreSQL using --with-libxml.
109 SELECT xmlelement(name employee, xmlforest(name, age, salary as pay)) FROM emp;
110 ERROR:  unsupported XML feature
111 DETAIL:  This functionality requires the server to be built with libxml support.
112 HINT:  You need to rebuild PostgreSQL using --with-libxml.
113 SELECT xmlelement(name duplicate, xmlattributes(1 as a, 2 as b, 3 as a));
114 ERROR:  unsupported XML feature
115 DETAIL:  This functionality requires the server to be built with libxml support.
116 HINT:  You need to rebuild PostgreSQL using --with-libxml.
117 SELECT xmlelement(name num, 37);
118 ERROR:  unsupported XML feature
119 DETAIL:  This functionality requires the server to be built with libxml support.
120 HINT:  You need to rebuild PostgreSQL using --with-libxml.
121 SELECT xmlelement(name foo, text 'bar');
122 ERROR:  unsupported XML feature
123 DETAIL:  This functionality requires the server to be built with libxml support.
124 HINT:  You need to rebuild PostgreSQL using --with-libxml.
125 SELECT xmlelement(name foo, xml 'bar');
126 ERROR:  unsupported XML feature
127 DETAIL:  This functionality requires the server to be built with libxml support.
128 HINT:  You need to rebuild PostgreSQL using --with-libxml.
129 SELECT xmlelement(name foo, text 'b<a/>r');
130 ERROR:  unsupported XML feature
131 DETAIL:  This functionality requires the server to be built with libxml support.
132 HINT:  You need to rebuild PostgreSQL using --with-libxml.
133 SELECT xmlelement(name foo, xml 'b<a/>r');
134 ERROR:  unsupported XML feature
135 DETAIL:  This functionality requires the server to be built with libxml support.
136 HINT:  You need to rebuild PostgreSQL using --with-libxml.
137 SELECT xmlelement(name foo, array[1, 2, 3]);
138 ERROR:  unsupported XML feature
139 DETAIL:  This functionality requires the server to be built with libxml support.
140 HINT:  You need to rebuild PostgreSQL using --with-libxml.
141 SET xmlbinary TO base64;
142 SELECT xmlelement(name foo, bytea 'bar');
143 ERROR:  unsupported XML feature
144 DETAIL:  This functionality requires the server to be built with libxml support.
145 HINT:  You need to rebuild PostgreSQL using --with-libxml.
146 SET xmlbinary TO hex;
147 SELECT xmlelement(name foo, bytea 'bar');
148 ERROR:  unsupported XML feature
149 DETAIL:  This functionality requires the server to be built with libxml support.
150 HINT:  You need to rebuild PostgreSQL using --with-libxml.
151 SELECT xmlelement(name foo, xmlattributes(true as bar));
152 ERROR:  unsupported XML feature
153 DETAIL:  This functionality requires the server to be built with libxml support.
154 HINT:  You need to rebuild PostgreSQL using --with-libxml.
155 SELECT xmlelement(name foo, xmlattributes('2009-04-09 00:24:37'::timestamp as bar));
156 ERROR:  unsupported XML feature
157 DETAIL:  This functionality requires the server to be built with libxml support.
158 HINT:  You need to rebuild PostgreSQL using --with-libxml.
159 SELECT xmlelement(name foo, xmlattributes('infinity'::timestamp as bar));
160 ERROR:  unsupported XML feature
161 DETAIL:  This functionality requires the server to be built with libxml support.
162 HINT:  You need to rebuild PostgreSQL using --with-libxml.
163 SELECT xmlelement(name foo, xmlattributes('<>&"''' as funny, xml 'b<a/>r' as funnier));
164 ERROR:  unsupported XML feature
165 DETAIL:  This functionality requires the server to be built with libxml support.
166 HINT:  You need to rebuild PostgreSQL using --with-libxml.
167 SELECT xmlparse(content 'abc');
168 ERROR:  unsupported XML feature
169 DETAIL:  This functionality requires the server to be built with libxml support.
170 HINT:  You need to rebuild PostgreSQL using --with-libxml.
171 SELECT xmlparse(content '<abc>x</abc>');
172 ERROR:  unsupported XML feature
173 DETAIL:  This functionality requires the server to be built with libxml support.
174 HINT:  You need to rebuild PostgreSQL using --with-libxml.
175 SELECT xmlparse(document 'abc');
176 ERROR:  unsupported XML feature
177 DETAIL:  This functionality requires the server to be built with libxml support.
178 HINT:  You need to rebuild PostgreSQL using --with-libxml.
179 SELECT xmlparse(document '<abc>x</abc>');
180 ERROR:  unsupported XML feature
181 DETAIL:  This functionality requires the server to be built with libxml support.
182 HINT:  You need to rebuild PostgreSQL using --with-libxml.
183 SELECT xmlpi(name foo);
184 ERROR:  unsupported XML feature
185 DETAIL:  This functionality requires the server to be built with libxml support.
186 HINT:  You need to rebuild PostgreSQL using --with-libxml.
187 SELECT xmlpi(name xml);
188 ERROR:  unsupported XML feature
189 DETAIL:  This functionality requires the server to be built with libxml support.
190 HINT:  You need to rebuild PostgreSQL using --with-libxml.
191 SELECT xmlpi(name xmlstuff);
192 ERROR:  unsupported XML feature
193 DETAIL:  This functionality requires the server to be built with libxml support.
194 HINT:  You need to rebuild PostgreSQL using --with-libxml.
195 SELECT xmlpi(name foo, 'bar');
196 ERROR:  unsupported XML feature
197 DETAIL:  This functionality requires the server to be built with libxml support.
198 HINT:  You need to rebuild PostgreSQL using --with-libxml.
199 SELECT xmlpi(name foo, 'in?>valid');
200 ERROR:  unsupported XML feature
201 DETAIL:  This functionality requires the server to be built with libxml support.
202 HINT:  You need to rebuild PostgreSQL using --with-libxml.
203 SELECT xmlpi(name foo, null);
204 ERROR:  unsupported XML feature
205 DETAIL:  This functionality requires the server to be built with libxml support.
206 HINT:  You need to rebuild PostgreSQL using --with-libxml.
207 SELECT xmlpi(name xml, null);
208 ERROR:  unsupported XML feature
209 DETAIL:  This functionality requires the server to be built with libxml support.
210 HINT:  You need to rebuild PostgreSQL using --with-libxml.
211 SELECT xmlpi(name xmlstuff, null);
212 ERROR:  unsupported XML feature
213 DETAIL:  This functionality requires the server to be built with libxml support.
214 HINT:  You need to rebuild PostgreSQL using --with-libxml.
215 SELECT xmlpi(name "xml-stylesheet", 'href="mystyle.css" type="text/css"');
216 ERROR:  unsupported XML feature
217 DETAIL:  This functionality requires the server to be built with libxml support.
218 HINT:  You need to rebuild PostgreSQL using --with-libxml.
219 SELECT xmlpi(name foo, '   bar');
220 ERROR:  unsupported XML feature
221 DETAIL:  This functionality requires the server to be built with libxml support.
222 HINT:  You need to rebuild PostgreSQL using --with-libxml.
223 SELECT xmlroot(xml '<foo/>', version no value, standalone no value);
224 ERROR:  unsupported XML feature
225 LINE 1: SELECT xmlroot(xml '<foo/>', version no value, standalone no...
226                            ^
227 DETAIL:  This functionality requires the server to be built with libxml support.
228 HINT:  You need to rebuild PostgreSQL using --with-libxml.
229 SELECT xmlroot(xml '<foo/>', version '2.0');
230 ERROR:  unsupported XML feature
231 LINE 1: SELECT xmlroot(xml '<foo/>', version '2.0');
232                            ^
233 DETAIL:  This functionality requires the server to be built with libxml support.
234 HINT:  You need to rebuild PostgreSQL using --with-libxml.
235 SELECT xmlroot(xml '<foo/>', version no value, standalone yes);
236 ERROR:  unsupported XML feature
237 LINE 1: SELECT xmlroot(xml '<foo/>', version no value, standalone ye...
238                            ^
239 DETAIL:  This functionality requires the server to be built with libxml support.
240 HINT:  You need to rebuild PostgreSQL using --with-libxml.
241 SELECT xmlroot(xml '<?xml version="1.1"?><foo/>', version no value, standalone yes);
242 ERROR:  unsupported XML feature
243 LINE 1: SELECT xmlroot(xml '<?xml version="1.1"?><foo/>', version no...
244                            ^
245 DETAIL:  This functionality requires the server to be built with libxml support.
246 HINT:  You need to rebuild PostgreSQL using --with-libxml.
247 SELECT xmlroot(xmlroot(xml '<foo/>', version '1.0'), version '1.1', standalone no);
248 ERROR:  unsupported XML feature
249 LINE 1: SELECT xmlroot(xmlroot(xml '<foo/>', version '1.0'), version...
250                                    ^
251 DETAIL:  This functionality requires the server to be built with libxml support.
252 HINT:  You need to rebuild PostgreSQL using --with-libxml.
253 SELECT xmlroot('<?xml version="1.1" standalone="yes"?><foo/>', version no value, standalone no);
254 ERROR:  unsupported XML feature
255 LINE 1: SELECT xmlroot('<?xml version="1.1" standalone="yes"?><foo/>...
256                        ^
257 DETAIL:  This functionality requires the server to be built with libxml support.
258 HINT:  You need to rebuild PostgreSQL using --with-libxml.
259 SELECT xmlroot('<?xml version="1.1" standalone="yes"?><foo/>', version no value, standalone no value);
260 ERROR:  unsupported XML feature
261 LINE 1: SELECT xmlroot('<?xml version="1.1" standalone="yes"?><foo/>...
262                        ^
263 DETAIL:  This functionality requires the server to be built with libxml support.
264 HINT:  You need to rebuild PostgreSQL using --with-libxml.
265 SELECT xmlroot('<?xml version="1.1" standalone="yes"?><foo/>', version no value);
266 ERROR:  unsupported XML feature
267 LINE 1: SELECT xmlroot('<?xml version="1.1" standalone="yes"?><foo/>...
268                        ^
269 DETAIL:  This functionality requires the server to be built with libxml support.
270 HINT:  You need to rebuild PostgreSQL using --with-libxml.
271 SELECT xmlroot (
272   xmlelement (
273     name gazonk,
274     xmlattributes (
275       'val' AS name,
276       1 + 1 AS num
277     ),
278     xmlelement (
279       NAME qux,
280       'foo'
281     )
282   ),
283   version '1.0',
284   standalone yes
285 );
286 ERROR:  unsupported XML feature
287 DETAIL:  This functionality requires the server to be built with libxml support.
288 HINT:  You need to rebuild PostgreSQL using --with-libxml.
289 SELECT xmlserialize(content data as character varying(20)) FROM xmltest;
290  xmlserialize 
291 --------------
292 (0 rows)
293
294 SELECT xmlserialize(content 'good' as char(10));
295 ERROR:  unsupported XML feature
296 LINE 1: SELECT xmlserialize(content 'good' as char(10));
297                                     ^
298 DETAIL:  This functionality requires the server to be built with libxml support.
299 HINT:  You need to rebuild PostgreSQL using --with-libxml.
300 SELECT xmlserialize(document 'bad' as text);
301 ERROR:  unsupported XML feature
302 LINE 1: SELECT xmlserialize(document 'bad' as text);
303                                      ^
304 DETAIL:  This functionality requires the server to be built with libxml support.
305 HINT:  You need to rebuild PostgreSQL using --with-libxml.
306 SELECT xml '<foo>bar</foo>' IS DOCUMENT;
307 ERROR:  unsupported XML feature
308 LINE 1: SELECT xml '<foo>bar</foo>' IS DOCUMENT;
309                    ^
310 DETAIL:  This functionality requires the server to be built with libxml support.
311 HINT:  You need to rebuild PostgreSQL using --with-libxml.
312 SELECT xml '<foo>bar</foo><bar>foo</bar>' IS DOCUMENT;
313 ERROR:  unsupported XML feature
314 LINE 1: SELECT xml '<foo>bar</foo><bar>foo</bar>' IS DOCUMENT;
315                    ^
316 DETAIL:  This functionality requires the server to be built with libxml support.
317 HINT:  You need to rebuild PostgreSQL using --with-libxml.
318 SELECT xml '<abc/>' IS NOT DOCUMENT;
319 ERROR:  unsupported XML feature
320 LINE 1: SELECT xml '<abc/>' IS NOT DOCUMENT;
321                    ^
322 DETAIL:  This functionality requires the server to be built with libxml support.
323 HINT:  You need to rebuild PostgreSQL using --with-libxml.
324 SELECT xml 'abc' IS NOT DOCUMENT;
325 ERROR:  unsupported XML feature
326 LINE 1: SELECT xml 'abc' IS NOT DOCUMENT;
327                    ^
328 DETAIL:  This functionality requires the server to be built with libxml support.
329 HINT:  You need to rebuild PostgreSQL using --with-libxml.
330 SELECT '<>' IS NOT DOCUMENT;
331 ERROR:  unsupported XML feature
332 LINE 1: SELECT '<>' IS NOT DOCUMENT;
333                ^
334 DETAIL:  This functionality requires the server to be built with libxml support.
335 HINT:  You need to rebuild PostgreSQL using --with-libxml.
336 SELECT xmlagg(data) FROM xmltest;
337  xmlagg 
338 --------
339  
340 (1 row)
341
342 SELECT xmlagg(data) FROM xmltest WHERE id > 10;
343  xmlagg 
344 --------
345  
346 (1 row)
347
348 SELECT xmlelement(name employees, xmlagg(xmlelement(name name, name))) FROM emp;
349 ERROR:  unsupported XML feature
350 DETAIL:  This functionality requires the server to be built with libxml support.
351 HINT:  You need to rebuild PostgreSQL using --with-libxml.
352 -- Check mapping SQL identifier to XML name
353 SELECT xmlpi(name ":::_xml_abc135.%-&_");
354 ERROR:  unsupported XML feature
355 DETAIL:  This functionality requires the server to be built with libxml support.
356 HINT:  You need to rebuild PostgreSQL using --with-libxml.
357 SELECT xmlpi(name "123");
358 ERROR:  unsupported XML feature
359 DETAIL:  This functionality requires the server to be built with libxml support.
360 HINT:  You need to rebuild PostgreSQL using --with-libxml.
361 PREPARE foo (xml) AS SELECT xmlconcat('<foo/>', $1);
362 ERROR:  unsupported XML feature
363 LINE 1: PREPARE foo (xml) AS SELECT xmlconcat('<foo/>', $1);
364                                               ^
365 DETAIL:  This functionality requires the server to be built with libxml support.
366 HINT:  You need to rebuild PostgreSQL using --with-libxml.
367 SET XML OPTION DOCUMENT;
368 EXECUTE foo ('<bar/>');
369 ERROR:  prepared statement "foo" does not exist
370 EXECUTE foo ('bad');
371 ERROR:  prepared statement "foo" does not exist
372 SET XML OPTION CONTENT;
373 EXECUTE foo ('<bar/>');
374 ERROR:  prepared statement "foo" does not exist
375 EXECUTE foo ('good');
376 ERROR:  prepared statement "foo" does not exist
377 -- Test backwards parsing
378 CREATE VIEW xmlview1 AS SELECT xmlcomment('test');
379 CREATE VIEW xmlview2 AS SELECT xmlconcat('hello', 'you');
380 ERROR:  unsupported XML feature
381 LINE 1: CREATE VIEW xmlview2 AS SELECT xmlconcat('hello', 'you');
382                                                  ^
383 DETAIL:  This functionality requires the server to be built with libxml support.
384 HINT:  You need to rebuild PostgreSQL using --with-libxml.
385 CREATE VIEW xmlview3 AS SELECT xmlelement(name element, xmlattributes (1 as ":one:", 'deuce' as two), 'content&');
386 ERROR:  unsupported XML feature
387 DETAIL:  This functionality requires the server to be built with libxml support.
388 HINT:  You need to rebuild PostgreSQL using --with-libxml.
389 CREATE VIEW xmlview4 AS SELECT xmlelement(name employee, xmlforest(name, age, salary as pay)) FROM emp;
390 ERROR:  unsupported XML feature
391 DETAIL:  This functionality requires the server to be built with libxml support.
392 HINT:  You need to rebuild PostgreSQL using --with-libxml.
393 CREATE VIEW xmlview5 AS SELECT xmlparse(content '<abc>x</abc>');
394 CREATE VIEW xmlview6 AS SELECT xmlpi(name foo, 'bar');
395 ERROR:  unsupported XML feature
396 DETAIL:  This functionality requires the server to be built with libxml support.
397 HINT:  You need to rebuild PostgreSQL using --with-libxml.
398 CREATE VIEW xmlview7 AS SELECT xmlroot(xml '<foo/>', version no value, standalone yes);
399 ERROR:  unsupported XML feature
400 LINE 1: CREATE VIEW xmlview7 AS SELECT xmlroot(xml '<foo/>', version...
401                                                    ^
402 DETAIL:  This functionality requires the server to be built with libxml support.
403 HINT:  You need to rebuild PostgreSQL using --with-libxml.
404 CREATE VIEW xmlview8 AS SELECT xmlserialize(content 'good' as char(10));
405 ERROR:  unsupported XML feature
406 LINE 1: ...EATE VIEW xmlview8 AS SELECT xmlserialize(content 'good' as ...
407                                                              ^
408 DETAIL:  This functionality requires the server to be built with libxml support.
409 HINT:  You need to rebuild PostgreSQL using --with-libxml.
410 CREATE VIEW xmlview9 AS SELECT xmlserialize(content 'good' as text);
411 ERROR:  unsupported XML feature
412 LINE 1: ...EATE VIEW xmlview9 AS SELECT xmlserialize(content 'good' as ...
413                                                              ^
414 DETAIL:  This functionality requires the server to be built with libxml support.
415 HINT:  You need to rebuild PostgreSQL using --with-libxml.
416 SELECT table_name, view_definition FROM information_schema.views
417   WHERE table_name LIKE 'xmlview%' ORDER BY 1;
418  table_name |                                view_definition                                
419 ------------+-------------------------------------------------------------------------------
420  xmlview1   | SELECT xmlcomment('test'::text) AS xmlcomment;
421  xmlview5   | SELECT XMLPARSE(CONTENT '<abc>x</abc>'::text STRIP WHITESPACE) AS "xmlparse";
422 (2 rows)
423
424 -- Text XPath expressions evaluation
425 SELECT xpath('/value', data) FROM xmltest;
426  xpath 
427 -------
428 (0 rows)
429
430 SELECT xpath(NULL, NULL) IS NULL FROM xmltest;
431  ?column? 
432 ----------
433 (0 rows)
434
435 SELECT xpath('', '<!-- error -->');
436 ERROR:  unsupported XML feature
437 LINE 1: SELECT xpath('', '<!-- error -->');
438                          ^
439 DETAIL:  This functionality requires the server to be built with libxml support.
440 HINT:  You need to rebuild PostgreSQL using --with-libxml.
441 SELECT xpath('//text()', '<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>');
442 ERROR:  unsupported XML feature
443 LINE 1: SELECT xpath('//text()', '<local:data xmlns:local="http://12...
444                                  ^
445 DETAIL:  This functionality requires the server to be built with libxml support.
446 HINT:  You need to rebuild PostgreSQL using --with-libxml.
447 SELECT xpath('//loc:piece/@id', '<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>', ARRAY[ARRAY['loc', 'http://127.0.0.1']]);
448 ERROR:  unsupported XML feature
449 LINE 1: SELECT xpath('//loc:piece/@id', '<local:data xmlns:local="ht...
450                                         ^
451 DETAIL:  This functionality requires the server to be built with libxml support.
452 HINT:  You need to rebuild PostgreSQL using --with-libxml.
453 SELECT xpath('//b', '<a>one <b>two</b> three <b>etc</b></a>');
454 ERROR:  unsupported XML feature
455 LINE 1: SELECT xpath('//b', '<a>one <b>two</b> three <b>etc</b></a>'...
456                             ^
457 DETAIL:  This functionality requires the server to be built with libxml support.
458 HINT:  You need to rebuild PostgreSQL using --with-libxml.
459 -- Test xmlexists and xpath_exists
460 SELECT xmlexists('//town[text() = ''Toronto'']' PASSING BY REF '<towns><town>Bidford-on-Avon</town><town>Cwmbran</town><town>Bristol</town></towns>');
461 ERROR:  unsupported XML feature
462 LINE 1: ...sts('//town[text() = ''Toronto'']' PASSING BY REF '<towns><t...
463                                                              ^
464 DETAIL:  This functionality requires the server to be built with libxml support.
465 HINT:  You need to rebuild PostgreSQL using --with-libxml.
466 SELECT xmlexists('//town[text() = ''Cwmbran'']' PASSING BY REF '<towns><town>Bidford-on-Avon</town><town>Cwmbran</town><town>Bristol</town></towns>');
467 ERROR:  unsupported XML feature
468 LINE 1: ...sts('//town[text() = ''Cwmbran'']' PASSING BY REF '<towns><t...
469                                                              ^
470 DETAIL:  This functionality requires the server to be built with libxml support.
471 HINT:  You need to rebuild PostgreSQL using --with-libxml.
472 SELECT xpath_exists('//town[text() = ''Toronto'']','<towns><town>Bidford-on-Avon</town><town>Cwmbran</town><town>Bristol</town></towns>'::xml);
473 ERROR:  unsupported XML feature
474 LINE 1: ...ELECT xpath_exists('//town[text() = ''Toronto'']','<towns><t...
475                                                              ^
476 DETAIL:  This functionality requires the server to be built with libxml support.
477 HINT:  You need to rebuild PostgreSQL using --with-libxml.
478 SELECT xpath_exists('//town[text() = ''Cwmbran'']','<towns><town>Bidford-on-Avon</town><town>Cwmbran</town><town>Bristol</town></towns>'::xml);
479 ERROR:  unsupported XML feature
480 LINE 1: ...ELECT xpath_exists('//town[text() = ''Cwmbran'']','<towns><t...
481                                                              ^
482 DETAIL:  This functionality requires the server to be built with libxml support.
483 HINT:  You need to rebuild PostgreSQL using --with-libxml.
484 INSERT INTO xmltest VALUES (4, '<menu><beers><name>Budvar</name><cost>free</cost><name>Carling</name><cost>lots</cost></beers></menu>'::xml);
485 ERROR:  unsupported XML feature
486 LINE 1: INSERT INTO xmltest VALUES (4, '<menu><beers><name>Budvar</n...
487                                        ^
488 DETAIL:  This functionality requires the server to be built with libxml support.
489 HINT:  You need to rebuild PostgreSQL using --with-libxml.
490 INSERT INTO xmltest VALUES (5, '<menu><beers><name>Molson</name><cost>free</cost><name>Carling</name><cost>lots</cost></beers></menu>'::xml);
491 ERROR:  unsupported XML feature
492 LINE 1: INSERT INTO xmltest VALUES (5, '<menu><beers><name>Molson</n...
493                                        ^
494 DETAIL:  This functionality requires the server to be built with libxml support.
495 HINT:  You need to rebuild PostgreSQL using --with-libxml.
496 INSERT INTO xmltest VALUES (6, '<myns:menu xmlns:myns="http://myns.com"><myns:beers><myns:name>Budvar</myns:name><myns:cost>free</myns:cost><myns:name>Carling</myns:name><myns:cost>lots</myns:cost></myns:beers></myns:menu>'::xml);
497 ERROR:  unsupported XML feature
498 LINE 1: INSERT INTO xmltest VALUES (6, '<myns:menu xmlns:myns="http:...
499                                        ^
500 DETAIL:  This functionality requires the server to be built with libxml support.
501 HINT:  You need to rebuild PostgreSQL using --with-libxml.
502 INSERT INTO xmltest VALUES (7, '<myns:menu xmlns:myns="http://myns.com"><myns:beers><myns:name>Molson</myns:name><myns:cost>free</myns:cost><myns:name>Carling</myns:name><myns:cost>lots</myns:cost></myns:beers></myns:menu>'::xml);
503 ERROR:  unsupported XML feature
504 LINE 1: INSERT INTO xmltest VALUES (7, '<myns:menu xmlns:myns="http:...
505                                        ^
506 DETAIL:  This functionality requires the server to be built with libxml support.
507 HINT:  You need to rebuild PostgreSQL using --with-libxml.
508 SELECT COUNT(id) FROM xmltest WHERE xmlexists('/menu/beer' PASSING data);
509  count 
510 -------
511      0
512 (1 row)
513
514 SELECT COUNT(id) FROM xmltest WHERE xmlexists('/menu/beer' PASSING BY REF data BY REF);
515  count 
516 -------
517      0
518 (1 row)
519
520 SELECT COUNT(id) FROM xmltest WHERE xmlexists('/menu/beers' PASSING BY REF data);
521  count 
522 -------
523      0
524 (1 row)
525
526 SELECT COUNT(id) FROM xmltest WHERE xmlexists('/menu/beers/name[text() = ''Molson'']' PASSING BY REF data);
527  count 
528 -------
529      0
530 (1 row)
531
532 SELECT COUNT(id) FROM xmltest WHERE xpath_exists('/menu/beer',data);
533  count 
534 -------
535      0
536 (1 row)
537
538 SELECT COUNT(id) FROM xmltest WHERE xpath_exists('/menu/beers',data);
539  count 
540 -------
541      0
542 (1 row)
543
544 SELECT COUNT(id) FROM xmltest WHERE xpath_exists('/menu/beers/name[text() = ''Molson'']',data);
545  count 
546 -------
547      0
548 (1 row)
549
550 SELECT COUNT(id) FROM xmltest WHERE xpath_exists('/myns:menu/myns:beer',data,ARRAY[ARRAY['myns','http://myns.com']]);
551  count 
552 -------
553      0
554 (1 row)
555
556 SELECT COUNT(id) FROM xmltest WHERE xpath_exists('/myns:menu/myns:beers',data,ARRAY[ARRAY['myns','http://myns.com']]);
557  count 
558 -------
559      0
560 (1 row)
561
562 SELECT COUNT(id) FROM xmltest WHERE xpath_exists('/myns:menu/myns:beers/myns:name[text() = ''Molson'']',data,ARRAY[ARRAY['myns','http://myns.com']]);
563  count 
564 -------
565      0
566 (1 row)
567
568 CREATE TABLE query ( expr TEXT );
569 INSERT INTO query VALUES ('/menu/beers/cost[text() = ''lots'']');
570 SELECT COUNT(id) FROM xmltest, query WHERE xmlexists(expr PASSING BY REF data);
571  count 
572 -------
573      0
574 (1 row)
575
576 -- Test xml_is_well_formed and variants
577 SELECT xml_is_well_formed_document('<foo>bar</foo>');
578 ERROR:  unsupported XML feature
579 DETAIL:  This functionality requires the server to be built with libxml support.
580 HINT:  You need to rebuild PostgreSQL using --with-libxml.
581 SELECT xml_is_well_formed_document('abc');
582 ERROR:  unsupported XML feature
583 DETAIL:  This functionality requires the server to be built with libxml support.
584 HINT:  You need to rebuild PostgreSQL using --with-libxml.
585 SELECT xml_is_well_formed_content('<foo>bar</foo>');
586 ERROR:  unsupported XML feature
587 DETAIL:  This functionality requires the server to be built with libxml support.
588 HINT:  You need to rebuild PostgreSQL using --with-libxml.
589 SELECT xml_is_well_formed_content('abc');
590 ERROR:  unsupported XML feature
591 DETAIL:  This functionality requires the server to be built with libxml support.
592 HINT:  You need to rebuild PostgreSQL using --with-libxml.
593 SET xmloption TO DOCUMENT;
594 SELECT xml_is_well_formed('abc');
595 ERROR:  unsupported XML feature
596 DETAIL:  This functionality requires the server to be built with libxml support.
597 HINT:  You need to rebuild PostgreSQL using --with-libxml.
598 SELECT xml_is_well_formed('<>');
599 ERROR:  unsupported XML feature
600 DETAIL:  This functionality requires the server to be built with libxml support.
601 HINT:  You need to rebuild PostgreSQL using --with-libxml.
602 SELECT xml_is_well_formed('<abc/>');
603 ERROR:  unsupported XML feature
604 DETAIL:  This functionality requires the server to be built with libxml support.
605 HINT:  You need to rebuild PostgreSQL using --with-libxml.
606 SELECT xml_is_well_formed('<foo>bar</foo>');
607 ERROR:  unsupported XML feature
608 DETAIL:  This functionality requires the server to be built with libxml support.
609 HINT:  You need to rebuild PostgreSQL using --with-libxml.
610 SELECT xml_is_well_formed('<foo>bar</foo');
611 ERROR:  unsupported XML feature
612 DETAIL:  This functionality requires the server to be built with libxml support.
613 HINT:  You need to rebuild PostgreSQL using --with-libxml.
614 SELECT xml_is_well_formed('<foo><bar>baz</foo>');
615 ERROR:  unsupported XML feature
616 DETAIL:  This functionality requires the server to be built with libxml support.
617 HINT:  You need to rebuild PostgreSQL using --with-libxml.
618 SELECT xml_is_well_formed('<local:data xmlns:local="http://127.0.0.1"><local:piece id="1">number one</local:piece><local:piece id="2" /></local:data>');
619 ERROR:  unsupported XML feature
620 DETAIL:  This functionality requires the server to be built with libxml support.
621 HINT:  You need to rebuild PostgreSQL using --with-libxml.
622 SELECT xml_is_well_formed('<pg:foo xmlns:pg="http://postgresql.org/stuff">bar</my:foo>');
623 ERROR:  unsupported XML feature
624 DETAIL:  This functionality requires the server to be built with libxml support.
625 HINT:  You need to rebuild PostgreSQL using --with-libxml.
626 SELECT xml_is_well_formed('<pg:foo xmlns:pg="http://postgresql.org/stuff">bar</pg:foo>');
627 ERROR:  unsupported XML feature
628 DETAIL:  This functionality requires the server to be built with libxml support.
629 HINT:  You need to rebuild PostgreSQL using --with-libxml.
630 SET xmloption TO CONTENT;
631 SELECT xml_is_well_formed('abc');
632 ERROR:  unsupported XML feature
633 DETAIL:  This functionality requires the server to be built with libxml support.
634 HINT:  You need to rebuild PostgreSQL using --with-libxml.