X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 506F19FA5DD for ; Wed, 31 May 2006 12:27:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 61351-04 for ; Wed, 31 May 2006 12:27:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by postgresql.org (Postfix) with ESMTP id 615E29FA5F0 for ; Wed, 31 May 2006 12:27:17 -0300 (ADT) Received: from [192.168.1.227] (68.143.134.146.nw.nuvox.net [68.143.134.146]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id k4VEobc07149; Wed, 31 May 2006 09:50:37 -0500 Message-ID: <447DB5B9.9020601@dunslane.net> Date: Wed, 31 May 2006 11:26:49 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060201 SeaMonkey/1.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-hackers@postgresql.org Subject: Re: Possible TODO item: copy to/from pipe References: <12436.1149087794@sss.pgh.pa.us> In-Reply-To: <12436.1149087794@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/1327 X-Sequence-Number: 84192 Tom Lane wrote: > > You can accomplish COPY piping now through psql, but it's a bit awkward: > > psql -c "COPY mytable TO stdout" mydb | gzip ... > > Thoughts? Is this worth doing, or is the psql -c approach good enough? > > I think it's good enough. And there is also pg_dump -F c -t bigtable -f bigtable.dump cheers andrew