Select Output in XML format

From: Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Select Output in XML format
Date: 2011-09-08 06:41:10
Message-ID: 4E686386.6030103@orkash.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 but how we can put our select
output into xml file.

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fujii Masao 2011-09-08 07:00:59 Re: master-side counterpart of pg_last_xact_replay_timestamp?
Previous Message Simon Riggs 2011-09-08 06:19:25 Re: master-side counterpart of pg_last_xact_replay_timestamp?