XPath fixes:
Peter Eisentraut <peter_e@gmx.net>
XPath fixes:
- Function renamed to "xpath".
- Function is now strict, per discussion.
- Return empty array in case when XPath expression detects nothing
(previously, NULL was returned in such case), per discussion.
- (bugfix) Work with fragments with prologue: select xpath('/a',
'<?xml version="1.0"?><a /><b />'); // now XML datum is always wrapped
with dummy <x>...</x>, XML prologue simply goes away (if any).
- Some cleanup.
Nikolay Samokhvalov
Some code cleanup and documentation work by myself.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/datatype.sgml | modified | +43 −3 |
| doc/src/sgml/func.sgml | modified | +47 −71 |
| src/backend/utils/adt/xml.c | modified | +111 −94 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +3 −3 |
| src/include/utils/xml.h | modified | +2 −2 |
| src/test/regress/expected/xml_1.out | modified | +12 −12 |
| src/test/regress/expected/xml.out | modified | +12 −12 |
| src/test/regress/sql/xml.sql | modified | +6 −6 |