Re: Dump and Query

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: Enrico <scotty(at)linuxtime(dot)it>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Dump and Query
Date: 2006-12-27 12:18:49
Message-ID: bf54be870612270418p6c9fcf3ey755bad513021eb94@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)linuxtime(dot)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(at)linuxtime(dot)it - Skype:sscotty71
> http://www.linuxtime.it/enricopirozzi
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Enrico 2006-12-27 13:05:30 Dump and Query
Previous Message Andy Shellam (Mailing Lists) 2006-12-27 12:14:57 Re: Dump and Query