Re: {xml}

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: {xml}
Date: 2014-08-07 21:53:02
Message-ID: 1407448382818-5814126.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ramesh T wrote
> Hello,
> when i ran following query on postgres 9.3,
> SELECT xmlagg(xmlelement(name e,part_id||',')) from part;
>
> result
> ..................
> {xml}
>
> how to get part_id's..? please let me know ..
> advance thanks,
> R..

Are you using psql? What version of PostgreSQL?

I am guessing "{xml}" is the client's way of saying that what you have is
"XML". Try casting the final result to "text" and see what you get.

Otherwise...

version
PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro
4.6.3-1ubuntu5) 4.6.3, 64-bit

Since this:

WITH vals (ids) AS (
VALUES ('1'),('2')
)
SELECT xmlagg(xmlelement(name "tag", ids))::text FROM vals;

works probably need to provide a self-contained example for someone to look
at.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/xml-tp5814076p5814126.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

  • {xml} at 2014-08-07 15:06:20 from Ramesh T

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-08-07 21:57:29 Re: Re: Feature proposal and discussion: full-fledged column/function equivalence
Previous Message Adrian Klaver 2014-08-07 21:21:36 Re: not finding rows using ctid