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 7A4E09FB1B7 for ; Sat, 3 Jun 2006 21:12:37 -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 83731-01 for ; Sat, 3 Jun 2006 21:12:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from candle.pha.pa.us (candle.pha.pa.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 0C13A9FA315 for ; Sat, 3 Jun 2006 21:12:27 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id k540C5V29587; Sat, 3 Jun 2006 20:12:05 -0400 (EDT) From: Bruce Momjian Message-Id: <200606040012.k540C5V29587@candle.pha.pa.us> Subject: Re: Possible TODO item: copy to/from pipe In-Reply-To: <447DB844.6010507@pse-consulting.de> To: Andreas Pflug Date: Sat, 3 Jun 2006 20:12:05 -0400 (EDT) CC: Tom Lane , pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/133 X-Sequence-Number: 84366 Andreas Pflug wrote: > Tom Lane wrote: > > After re-reading what I just wrote to Andreas about how compression of > > COPY data would be better done outside the backend than inside, it > > struck me that we are missing a feature that's fairly common in Unix > > programs. Perhaps COPY ought to have the ability to pipe its output > > to a shell command, or read input from a shell command. Maybe something > > like > > > > COPY mytable TO '| gzip >/home/tgl/mytable.dump.gz'; For use case, consider this: COPY mytable TO '| rsh x@y.com > test '; so you can COPY to another server directly. -- Bruce Momjian http://candle.pha.pa.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +