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 <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +