Search Postgresql Archives

Re: select Xpath is returning values with {}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 12, 2013 at 8:46 PM, gajendra s v <svgajendra@xxxxxxxxx> wrote:
Hi All,

How to remove {} from output 

I am using below query 

select (xpath('//Grading_Automated',(select xmlgrading from km_course_mast where id='100000'))) from km_course_mast where id='100000'

The out is below 

"{"<Grading_Automated>
 
</Grading_Automated>"}"

 
The xpath return type is of type array. PG returns the array data, enclosed in "{}". If you want to remove these "{}" braces, then use either array_to_string(xpath(.......)) or trim the braces from the xpath output.

Regards,
Dinesh
manojadinesh.blogspot.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux