Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WaUZs-0004Q2-Bh for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Apr 2014 18:28:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WaUZr-0000tc-Q9 for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Apr 2014 18:28:55 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WaUZq-0000tQ-S1 for pgsql-bugs@postgresql.org; Wed, 16 Apr 2014 18:28:55 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WaUZo-0001Zb-I5 for pgsql-bugs@postgresql.org; Wed, 16 Apr 2014 18:28:54 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WaUZn-0007ul-TO; Wed, 16 Apr 2014 14:28:51 -0400 Date: Wed, 16 Apr 2014 14:28:51 -0400 From: Bruce Momjian To: postgresql.org@ch.pkts.ca Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10052: COPY (...) TO 'file' doesn't create file Message-ID: <20140416182851.GH7443@momjian.us> References: <20140416175436.17202.83628@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140416175436.17202.83628@wrigleys.postgresql.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Wed, Apr 16, 2014 at 05:54:36PM +0000, postgresql.org@ch.pkts.ca wrote: > The following bug has been logged on the website: > > Bug reference: 10052 > Logged by: PFudd > Email address: postgresql.org@ch.pkts.ca > PostgreSQL version: 9.2.8 > Operating system: CentOS 6.5 > Description: > > In psql, this command works: > # copy (select * from history) to STDOUT; > It prints 957 lines to stdout. > > However, if I do: > # copy (select * from history) to '/tmp/foo.txt'; > it prints > COPY 957 > but doesn't create the file /tmp/foo.txt. Uh, you realize that is a file on the server, not on the client. You might want to try psql's \copy. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs