Re: {xml} - Mailing list pgsql-general

From David G Johnston
Subject Re: {xml}
Date
Msg-id 1407448382818-5814126.post@n5.nabble.com
Whole thread Raw
In response to {xml}  (Ramesh T <rameshparnanditech@gmail.com>)
List 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.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: not finding rows using ctid
Next
From: Tom Lane
Date:
Subject: Re: Re: Feature proposal and discussion: full-fledged column/function equivalence