Search Postgresql Archives

Re: copy with where query?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx [mailto:pgsql-general-
> owner@xxxxxxxxxxxxxx] On Behalf Of CSN
> Sent: Thursday, December 08, 2005 5:29 PM
> To: pgsql-general@xxxxxxxxxxxxxx
> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux