Re: BUG #10052: COPY (...) TO 'file' doesn't create file

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: postgresql(dot)org(at)ch(dot)pkts(dot)ca
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #10052: COPY (...) TO 'file' doesn't create file
Date: 2014-04-16 18:28:51
Message-ID: 20140416182851.GH7443@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Apr 16, 2014 at 05:54:36PM +0000, postgresql(dot)org(at)ch(dot)pkts(dot)ca wrote:
> The following bug has been logged on the website:
>
> Bug reference: 10052
> Logged by: PFudd
> Email address: postgresql(dot)org(at)ch(dot)pkts(dot)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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2014-04-16 23:05:26 Re: BUG #9046: vacuum analyze fails on a table that has domain that is a date rage
Previous Message postgresql.org 2014-04-16 18:17:52 BUG #10054: Re: COPY (...) TO 'file' doesn't create file