From: Tom Lane <tgl@sss.pgh.pa.us>
To: mostafa_bit0108@hotmail.com
Cc: pgsql-bugs@lists.postgresql.org, Chapman Flack <chap@anastigmatix.net>
Cc: Markus Winand <markus.winand@winand.at>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Subject: Re: BUG #16046: xpath returns CDATA tag along with the value in postgres 12
Date: Thu, 24 Oct 2019 17:38:11 -0400
Message-ID: <10621.1571953091@sss.pgh.pa.us> (raw)
In-Reply-To: <16046-a04d0611e7a0c03a@postgresql.org>
References: <16046-a04d0611e7a0c03a@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> 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]]>
I haven't actually bisected to make sure, but I imagine this is a
consequence of commit 251cf2e27bec98274e8bb002608680bdc211319e.
What's not entirely clear to me is whether it's an intentional
effect, or a bug. Authors, any comments?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mostafa_bit0108@hotmail.com, chap@anastigmatix.net, markus.winand@winand.at, pavel.stehule@gmail.com
Subject: Re: BUG #16046: xpath returns CDATA tag along with the value in postgres 12
In-Reply-To: <10621.1571953091@sss.pgh.pa.us>
References: <16046-a04d0611e7a0c03a@postgresql.org> <10621.1571953091@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox