Re: xml

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ramesh T <rameshparnanditech(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: xml
Date: 2015-03-23 14:42:05
Message-ID: CAFj8pRDPK7Hf3kbm1NqQzfn4XhE+jcWR7eqd1Vy5DfBZhyoetw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2015-03-23 15:09 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > result of xmlagg is not valid xml.
>
> Really? Either that's a bug, or it's declared wrong.
>

I was not accurate. "<tag /><tag />" is not valid xml document - and xpath
function doens't like it.

postgres=# select xpath('//tag/@x','<tag x="x"/><tag />'::xml);
ERROR: could not parse XML document
DETAIL: line 1: Extra content at the end of the document
<tag x="x"/><tag />
^
CONTEXT: SQL function "xpath" statement 1
postgres=# select xpath('//tag/@x','<x><tag x="x"/><tag /></x>'::xml);
xpath
-------
{x}
(1 row)

postgres=# select '<tag x="x"/><tag />'::xml;
xml
---------------------
<tag x="x"/><tag />
(1 row)

Regards

Pavel

>
> regards, tom lane
>

In response to

  • Re: xml at 2015-03-23 14:09:43 from Tom Lane

Browse pgsql-general by date

  From Date Subject
Next Message Vladimir Borodin 2015-03-23 14:45:12 Re: [GENERAL] [pgadmin-support] Issue with a hanging apply process on the replica db after vacuum works on primary
Previous Message Tom Lane 2015-03-23 14:38:32 Re: scope quirk in copy in function