Re: How to data dump a table content to a CSV or XML format?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: "Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to data dump a table content to a CSV or XML format?
Date: 2010-10-04 20:23:32
Message-ID: 4CAA37C4.3030505@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/04/2010 12:59 PM, Wang, Mary Y wrote:
> Hi All,
>
> I'd like to do a data dump of a table to a CSV or XML file.
> How would I do that?
>
> I'm running on Postgres 8.3.8.
>
> Thanks in advance.
> Mary Wang
>
>
>
>
>

As sql COPY"
http://www.postgresql.org/docs/8.3/interactive/sql-copy.html
In psql \copy
http://www.postgresql.org/docs/8.3/interactive/app-psql.html

COPY is done from the standpoint of the server so the file location must
be accessible to the server.

\copy is done from the standpoint of the client.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Cédric Villemain 2010-10-04 20:50:24 Re: PG website testing
Previous Message Dann Corbit 2010-10-04 20:21:00 Re: How to data dump a table content to a CSV or XML format?