From: Michael Fuhr <mike@fuhr.org>
To: Cédric Buschini <cbuschini@carax.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: COPY TO / COPY FROM
Date: Fri, 23 Sep 2005 07:47:03 -0600
Message-ID: <20050923134703.GA73062@winnie.fuhr.org> (raw)
In-Reply-To: <4333EB91.7020909@carax.com>
References: <4333EB91.7020909@carax.com>
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;
> EOF
>
> psql -h192.168.XXX.XXX -dDATABASE -Upostgres << EOF
> COPY carax_exec_bck FROM '/home/postgres/FILE';
> EOF
> =======================
>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mike@fuhr.org, cbuschini@carax.com, pgsql-admin@postgresql.org
Subject: Re: COPY TO / COPY FROM
In-Reply-To: <20050923134703.GA73062@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox