I am a novice in psql and need some help. How can I load a local CSV to a remote DB?
I am using the following command
\COPY test(user_id, product_id, value)
FROM '/Users/testuser/test.tsv' WITH DELIMITER '\t' CSV HEADER;
but this searches the file on the remote DB while I need to do that on my local PC.
\copy
reads a local file (it's apsql
command and can only be used from insidepsql
).COPY
however (note the missing ``) will read the file on the server. – a_horse_with_no_name Apr 4 at 14:53