Skip site navigation (1) Skip section navigation (2)


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Cédric Buschini <cbuschini(at)carax(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: COPY TO / COPY FROM
Date: 2005-09-23 13:47:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-adminpgsql-sql
On Fri, Sep 23, 2005 at 01:48:33PM +0200, Cédric Buschini wrote:
> =====================
> psql -h192.168.XXX.XXX -dDATABASE -Upostgres << EOF  > /home/postgres/FILE
> COPY TABLE TO stdout;
> psql -h192.168.XXX.XXX -dDATABASE -Upostgres << EOF
> COPY carax_exec_bck FROM '/home/postgres/FILE';
> =======================
> I got this error :
> ERROR:  could not open file "/home/postgres/FILE" for reading: No such 
> file or directory

Are the client and server on the same machine?  The use of the -h
option suggests perhaps not.  In the first command you're redirecting
psql's output to a file on the client machine, and in the second
command you're trying to read a file on the server machine.

Michael Fuhr

In response to

pgsql-admin by date

Next:From: Scott MarloweDate: 2005-09-23 15:23:44
Subject: Re: Encrypted Disks
Previous:From: Spiegelberg, GregDate: 2005-09-23 13:07:35
Subject: Re: postgresql cluster on SAN

pgsql-sql by date

Next:From: Hilary ForbesDate: 2005-09-23 14:09:52
Subject: Where are user defined functions stored?
Previous:From: Michael FuhrDate: 2005-09-23 13:30:22
Subject: Re: Issue with UPDATE statement on v8

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group