Re: local disk access for a remote psql connection - Mailing list pgsql-novice

From Tom Lane
Subject Re: local disk access for a remote psql connection
Date
Msg-id 26273.1238458060@sss.pgh.pa.us
Whole thread Raw
In response to local disk access for a remote psql connection  (P Kapat <kap4lin@gmail.com>)
List pgsql-novice
P Kapat <kap4lin@gmail.com> writes:
> ... 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

Of course it won't work; that command reads files on the server's
filesystem.  Use psql's \copy command to copy files from/to the client
filesystem.

            regards, tom lane

pgsql-novice by date:

Previous
From: P Kapat
Date:
Subject: local disk access for a remote psql connection
Next
From: Lonni J Friedman
Date:
Subject: performance: delete+insert versus update