Re: Exporting data from view

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Aaron Koning <aaronkoning(at)gmail(dot)com>
Cc: Worky Workerson <worky(dot)workerson(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Exporting data from view
Date: 2006-06-20 19:41:09
Message-ID: 20060620194109.GG25678@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 20, 2006 at 10:29:21AM -0700, Aaron Koning wrote:
> CREATE TABLE sometable AS SELECT * FROM someview;
> pg_dump -t sometable dbname
> DROP TABLE sometable
>
> Que? Si!

Eh? If you're going to create the table anyway, I'd use psql:

psql -c "COPY table TO STDOUT"

If you put "CSV" there you can get the output in CSV. Far cleaner than
pg_dump.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aaron Koning 2006-06-20 19:44:24 Re: Exporting data from view
Previous Message hubert depesz lubaczewski 2006-06-20 18:21:57 Re: A slow query - Help please?