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 3588F9FA5CE for ; Sun, 4 Jun 2006 18:39:39 -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 54327-07 for ; Sun, 4 Jun 2006 18:39:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id 9E7519F9316 for ; Sun, 4 Jun 2006 18:39:31 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1Fn0JZ-0004M3-00; Sun, 04 Jun 2006 17:39:17 -0400 To: Andreas Pflug Cc: Bruce Momjian , Tom Lane , pgsql-hackers@postgresql.org Subject: Re: Possible TODO item: copy to/from pipe References: <200606040012.k540C5V29587@candle.pha.pa.us> <4482CCE5.6020900@pse-consulting.de> In-Reply-To: <4482CCE5.6020900@pse-consulting.de> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 04 Jun 2006 17:39:17 -0400 Message-ID: <87hd30bny2.fsf@stark.xeocode.com> Lines: 20 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/143 X-Sequence-Number: 84376 Andreas Pflug writes: > Bruce Momjian wrote: > > > > For use case, consider this: > > > > COPY mytable TO '| rsh x@y.com > test '; > > > > so you can COPY to another server directly. > > > Why not rsh psql -c "\copy foobar to test" ? Who knows? The sysadmin could have any reason to prefer one to the other. One that comes to mind is that he or she may want to automate this and may be happier granting password-free access to a filesystem server that just holds encrypted backups than to the live production database. -- greg