From: Shoaib Mir <shoaibmir@gmail.com>
To: Enrico <scotty@linuxtime.it>
Cc: pgsql-admin@postgresql.org
Subject: Re: Dump and Query
Date: Wed, 27 Dec 2006 17:18:49 +0500
Message-ID: <bf54be870612270418p6c9fcf3ey755bad513021eb94@mail.gmail.com> (raw)
In-Reply-To: <20061227140530.094fc4d3.scotty@linuxtime.it>
References: <20061227140530.094fc4d3.scotty@linuxtime.it>
You can use the COPY (
http://www.postgresql.org/docs/current/static/sql-copy.html) command for
doing so....
An example will be -->
COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO
'/usr1/proj/bray/sql/a_list_countries.copy';
---------------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 12/27/06, Enrico <scotty@linuxtime.it> wrote:
>
> Is there any way to make a dump from a query?
>
> For example if my query is:
>
> select field1,field2 from table
>
> Does it exist a shell command like pg_dump --QUERY myquery -f myfile?
>
> Have a nice day
> Enrico
>
> --
> If Bill Gates had a penny for everytime Windows crashed,he'd be a
> multi-billionaire by now .......oh look, he already is !!!!
> scotty@linuxtime.it - Skype:sscotty71
> http://www.linuxtime.it/enricopirozzi
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: shoaibmir@gmail.com, scotty@linuxtime.it
Subject: Re: Dump and Query
In-Reply-To: <bf54be870612270418p6c9fcf3ey755bad513021eb94@mail.gmail.com>
References: <20061227140530.094fc4d3.scotty@linuxtime.it> <bf54be870612270418p6c9fcf3ey755bad513021eb94@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox