local disk access for a remote psql connection

From: P Kapat <kap4lin(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: local disk access for a remote psql connection
Date: 2009-03-30 23:53:00
Message-ID: daef5be80903301653o4bd6a55due0ef242fb91ea502@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I am connecting to a remote machine using (both local client and
remote server are RedHat EL 5.3):

psql -d mydb -h remote.machine.example.com -U myuser -W

After giving the password, the connection is made and I can
list/create tables etc. Now I want to copy a csv file, which is on the
local client machine, into a table on the remote server machine. I try
to do so via:

COPY myschm.mytb FROM '/home/myuser/myfile.csv' WITH CSV header
QUOTE AS '\"';

which clearly doesn't work, giving: ERROR: could not open file ......
No such file or directory

I could transfer the file from my local client to the remote host, but
I would prefer not to. This creates a syncing headache between the
local and remote machines. Similarly when copying an existing table to
disk, I would prefer it to write to the local client's disk rather
than to the remote server's disk.

Is any/both of these possible?

--
Regards
PK
--------------------------------------
http://counter.li.org #402424

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2009-03-31 00:07:40 Re: local disk access for a remote psql connection
Previous Message bijoy 2009-03-30 16:48:43 Re: createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "root" error