Log into your virtual instance. In my case, i will ssh into an ec2 instance using a pem file like this:
ssh -i file.pem ubuntu@IPNext, log into the postgres client followed by your password.
psql -U user -h hostname dbnamePostgres make use of the COPY command to deal with large volume of data more efficiently.
\copy table_name(field1,field2) FROM path_to_file_on_server.csv DELIMITER ';'When using the \copy command we do not use the quotes on the file name. A path to a csv file on the server could look like the following: /home/ubuntu/downloads/file.csv
Comments
Post a Comment