Re: XML/XPath issues: text/CDATA in XMLTABLE, XPath evaluated with wrong context

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Markus Winand <markus.winand@winand.at>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, pgsql-hackers@postgresql.org
Date: 2019-03-07T21:28:06Z
Lists: pgsql-hackers
On 2018-Jul-08, Markus Winand wrote:

> Hi!
> 
> > I have pushed the patch now (in your original form rather than my later
> > formulation) -- let's see how the buildfarm likes it.  There are (at
> > least) three issues remaining, as per below; Pavel, do you have any
> > insight on these?
> 
> Attached patch 0001 fixes all three issues and one more that is, again, 
> an incompatible change (see below).

For closure: this was re-published as
https://postgr.es/m/3e8eab9e-7289-6c23-5e2c-153cccea2257@anastigmatix.net
and got pushed as commit 251cf2e27be.

Thank you for reporting this!

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Fix minor deficiencies in XMLTABLE, xpath(), xmlexists()

  2. Set correct context for XPath evaluation

  3. Accept TEXT and CDATA nodes in XMLTABLE's column_expression.