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: pgsql-hackers@postgresql.org
Date: 2018-06-20T17:08:47Z
Lists: pgsql-hackers
Hi

On 2018-Mar-27, Markus Winand wrote:

> I’ve found two issues with XML/XPath integration in PostgreSQL. Two
> patches are attached. I’ve just separated them because the second one
> is an incompatible change.
> 
> * Patch 0001: Accept TEXT and CDATA nodes in XMLTABLE’s column_expression.

I pushed 0001 to REL_10_STABLE and master -- since there is no
incompatible behavior change.  (Well, there is a behavior change, but
it's pretty hard to imagine someone would be relying on the bogus old
output.)

I'll see about 0002 now -- only to master, as discussed.

-- 
Á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.