Skip site navigation (1) Skip section navigation (2)

Re: COPY (query) TO file

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Mark Woodward <pgsql(at)mohawksoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY (query) TO file
Date: 2006-06-02 13:56:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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.



In response to


pgsql-hackers by date

Next:From: Mark WoodwardDate: 2006-06-02 14:01:18
Subject: Re: COPY (query) TO file
Previous:From: Tino WildenhainDate: 2006-06-02 13:41:48
Subject: Re: COPY (query) TO file

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group