I'm trying to copy the data from an csv file to table in windows cmd using psql. please find the below cmd which I have used,
psql -h localhost -p 5432 -U postgres --dbname postgres -c COPY test FROM 'D:\test\Book1.csv' DELIMITER ',' CSV HEADER;
and getting an error: extra command line argument.
Here Im looking for the command which connects to DB and loads the data into DB in a single command.
Thanks.
-cand its arguments in double quotes so that Windows interprets them as a single argument.