Re: [GENERAL] Select Output in XML format

2011-09-08 Thread Chetan Suttraway
On Thu, Sep 8, 2011 at 12:53 PM, Adarsh Sharma wrote: > Thanks I am trying as below ; > > > db_name=# select table_to_xml(tbl master, nulls boolean, tableforest > boolean, targetns text); > ERROR: syntax error at or near "master" > LINE 1: select table_to_xml(tbl master, nulls boolean, tablefores

Re: [GENERAL] Select Output in XML format

2011-09-08 Thread Chetan Suttraway
On Thu, Sep 8, 2011 at 12:53 PM, Adarsh Sharma wrote: > Thanks I am trying as below ; > > > db_name=# select table_to_xml(tbl master, nulls boolean, tableforest > boolean, targetns text); > ERROR: syntax error at or near "master" > LINE 1: select table_to_xml(tbl master, nulls boolean, tablefores

Re: [GENERAL] Select Output in XML format

2011-09-08 Thread Adarsh Sharma
Thanks I am trying as below ; db_name=# select table_to_xml(tbl master, nulls boolean, tableforest boolean, targetns text); ERROR: syntax error at or near "master" LINE 1: select table_to_xml(tbl master, nulls boolean, tableforest b... ^ Do I

Re: [GENERAL] Select Output in XML format

2011-09-08 Thread Chetan Suttraway
On Thu, Sep 8, 2011 at 12:11 PM, Adarsh Sharma wrote: > Dear all, > > Today I need to write the output of an postgres table into XML format. > I think there is an easiest way to do this but not able to find it. > > In mysql there is simple query for that : > > mysql -X -e "select * from db_name.ma

Re: [GENERAL] Select Output in XML format

2011-09-08 Thread Craig Ringer
On 8/09/2011 2:41 PM, Adarsh Sharma wrote: Dear all, Today I need to write the output of an postgres table into XML format. I think there is an easiest way to do this but not able to find it. http://www.postgresql.org/docs/current/static/functions-xml.html Use the query_to_xml or table_to_xml

[GENERAL] Select Output in XML format

2011-09-07 Thread Adarsh Sharma
Dear all, Today I need to write the output of an postgres table into XML format. I think there is an easiest way to do this but not able to find it. In mysql there is simple query for that : mysql -X -e "select * from db_name.master" > /hdd2-1/test.xml In postgres , i find some XML data types