mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
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.
This commit is contained in:
parent
0d130c7abc
commit
a9f66f9253
@ -4431,7 +4431,7 @@ XmlTableGetValue(TableFuncScanState *state, int colnum,
|
||||
PG_TRY();
|
||||
{
|
||||
/* Set current node as entry point for XPath evaluation */
|
||||
xmlXPathSetContextNode(cur, xtCxt->xpathcxt);
|
||||
xtCxt->xpathcxt->node = cur;
|
||||
|
||||
/* Evaluate column path */
|
||||
xpathobj = xmlXPathCompiledEval(xtCxt->xpathscomp[colnum], xtCxt->xpathcxt);
|
||||
|
Loading…
Reference in New Issue
Block a user