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

Re: COPY (query) TO file

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Mark Woodward <pgsql(at)mohawksoft(dot)com>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY (query) TO file
Date: 2006-06-03 02:03:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Mark Woodward wrote:
>>>>  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.
>>> I second that - allowing arbitrary SELECT statements as a COPY source
>>> seems much more powerful and flexible than just supporting COPY FROM
>>> VIEW.
>> Not to be a sour apple or anything but I don't see how any of this is
>> needed in the backend since we can easily use Psql to do it, or pretty
>> much any other tool.
> There is an important difference between a capability in the backend vs
> one synthesized in the frontend.

To be clear, I am not suggesting that we implement COPY TO *in* the 
client. I am suggesting I don't see the purpose of COPY TO when we can 
just use the psql query capability to achieve the same thing.

In talking with Andrew he is saying there is overhead in pulling these 
types of result sets through the client but people that are using this 
feature... won't they be connecting remotely anyway ?

I mean... why are we using COPY TO on the same server? what purpose does 
it serve? What I see COPY TO for is an fast way to pull out bulk reports 
or something like that... all of which I am NOT going to do on the server.

Joshua D. Drake


    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997

In response to

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2006-06-03 02:15:08
Subject: Re: COPY (query) TO file
Previous:From: Joshua D. DrakeDate: 2006-06-03 01:55:30
Subject: Why do we want to %Remove behavior of postmaster -o

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