Re: Select Output in XML format

From: Chetan Suttraway <chetan(dot)suttraway(at)enterprisedb(dot)com>
To: Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Select Output in XML format
Date: 2011-09-08 07:14:08
Message-ID: CAPtHcnEVvoWhXwKyBTT7iJbGWMAOT9L_xwZQtc2Z7cMPZo5ELA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 8, 2011 at 12:11 PM, Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>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.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
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-general<http://www.postgresql.org/mailpref/pgsql-general>
>

Please go through below link:

http://www.postgresql.org/docs/9.0/static/xml2.html
http://developer.postgresql.org/pgdocs/postgres/functions-xml.html

Regards,
Chetan

--
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Website: www.enterprisedb.com
EnterpriseDB Blog : http://blogs.enterprisedb.com
Follow us on Twitter : http://www.twitter.com/enterprisedb

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adarsh Sharma 2011-09-08 07:23:37 Re: Select Output in XML format
Previous Message Craig Ringer 2011-09-08 07:12:51 Re: Select Output in XML format