BUG #16046: xpath returns CDATA tag along with the value in postgres 12

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: mostafa_bit0108(at)hotmail(dot)com
Subject: BUG #16046: xpath returns CDATA tag along with the value in postgres 12
Date: 2019-10-09 09:22:05
Message-ID: 16046-a04d0611e7a0c03a@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16046
Logged by: Mohammad Mostafa Kamal
Email address: mostafa_bit0108(at)hotmail(dot)com
PostgreSQL version: 12.0
Operating system: Windows 7
Description:

While using xpath to extract text from a CDATA section of xml, it returns
CDATA tag along with the value.

Query: SELECT
unnest(xpath('//cname/aname/text()','<cname><aname><![CDATA[select
5]]></aname></cname>'::xml))

Output - pg11: select 5

Output - pg12: <![CDATA[select 5]]>

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2019-10-09 13:24:36 Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12
Previous Message Michael Paquier 2019-10-09 04:42:07 Re: BUG #16039: PANIC when activating replication slots in Postgres 12.0 64bit under Windows