Re: COPY (query) TO file - Mailing list pgsql-hackers

From David Fetter
Subject Re: COPY (query) TO file
Date
Msg-id 20060602213448.GB23684@fetter.org
Whole thread Raw
In response to Re: COPY (query) TO file  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Fri, Jun 02, 2006 at 09:56:07AM -0400, Andrew Dunstan wrote:
> Mark Woodward wrote:
> >Tom had posted a question about file compression with copy. I thought
> >about it, and I want to through this out and see if anyone things it is a
> >good idea.
> >
> >Currently, the COPY command only copies a table, what if it could operate
> >with a query, as:
> >
> >COPY (select * from mytable where foo='bar') as BAR TO stdout
> >
> >  
> 
> Isn't this already being worked on? The TODO list says:
> 
>  Allow COPY to output from views
>  Another idea would be to allow actual SELECT statements in a COPY.
> 
> Personally I strongly favor the second option as being more flexible 
> than the first.

+1 :)

Cheers,
D
-- 
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666                             Skype: davidfetter

Remember to vote!


pgsql-hackers by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: COPY (query) TO file
Next
From: Greg Stark
Date:
Subject: Re: More thoughts about planner's cost estimates