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

Re: [PATCH] COPY .. COMPRESSED

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] COPY .. COMPRESSED
Date: 2013-01-16 22:05:30
Message-ID: CA+TgmoZqCn5GDKpWO45pW0BZQkHUtvxC5uYs0DkEDgVmSMw8AA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Jan 14, 2013 at 11:28 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
>> Stephen Frost <sfrost(at)snowman(dot)net> writes:
>> > I do like the idea of a generalized answer which just runs a
>> > user-provided command on the server but that's always going to require
>> > superuser privileges.
>>
>> The design that was being kicked around allowed pipes to be used on the
>> client side too, ie \copy foo to '| gzip ...'.  That form would not
>> require any special privileges, and might be thought preferable for
>> another reason too: it offloads the work from the server.
>
> It's a different use-case which, imv, is really already trivially
> covered:
>
> psql -c 'COPY foo TO STDOUT;' | gzip > myfile.gz
>
> While there is no option currently for having the server do the
> compression before sending the data over the wire.

+1.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


In response to

pgsql-hackers by date

Next:From: Robert HaasDate: 2013-01-16 22:15:49
Subject: Re: [PATCH] COPY .. COMPRESSED
Previous:From: Robert HaasDate: 2013-01-16 22:01:12
Subject: Re: CF3+4 (was Re: Parallel query execution)

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