Skip to content

Commit a9f66f9

Browse files
committed
Fix XMLTABLE on older libxml2
libxml2 older than 2.9.1 does not have xmlXPathSetContextNode (released in 2013, so reasonable platforms have trouble). That function is fairly trivial, so I have inlined it in the one added caller. This passes tests on my machine; let's see what the buildfarm thinks about it. Per joint complaint from Tom Lane and buildfarm.
1 parent 0d130c7 commit a9f66f9

File tree

1 file changed

+1
-1
lines changed
  • src/backend/utils/adt

1 file changed

+1
-1
lines changed

src/backend/utils/adt/xml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4431,7 +4431,7 @@ XmlTableGetValue(TableFuncScanState *state, int colnum,
44314431
PG_TRY();
44324432
{
44334433
/* Set current node as entry point for XPath evaluation */
4434-
xmlXPathSetContextNode(cur, xtCxt->xpathcxt);
4434+
xtCxt->xpathcxt->node = cur;
44354435

44364436
/* Evaluate column path */
44374437
xpathobj = xmlXPathCompiledEval(xtCxt->xpathscomp[colnum], xtCxt->xpathcxt);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy