From: | "Dann Corbit" <DCorbit(at)connx(dot)com> |
---|---|
To: | "CSN" <cool_screen_name90001(at)yahoo(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: copy with where query? |
Date: | 2005-12-09 01:48:37 |
Message-ID: | D425483C2C5C9F49B5B7A41F8944154757D34E@postal.corporate.connx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
How about something like:
BEGIN TRAN
SELECT INTO TEMP TABLE foobar WHERE <cond_list>
COPY foobar TO data.txt
COMMIT
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of CSN
> Sent: Thursday, December 08, 2005 5:29 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] copy with where query?
>
> Is it possible to copy data from a table into a file and specify a
query
> for what data should be
> included? e.g.
>
> \copy table1 to 'data.txt' where col1=true
>
>
> thanks
> csn
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Pireddu | 2005-12-09 02:12:25 | bug or not? Trigger preventing delete causes circumvention of FK |
Previous Message | CSN | 2005-12-09 01:28:51 | copy with where query? |