I am trying to import data from a local file into the postgres remote database using the copy keyword in query. It shows the following error: “Only roles with privileges of the “pg_read_server_files” role may COPY from a file.permission denied to COPY from a file”
Can I make my user a SUPERUSER? Why cant I have access to superuser in postgres ?
Thank you for your reply. I am trying to import data from a .csv file to your PG table. If COPY is not the right way, can you guide me how to do this ?
Correct \copy would be used via psql which was I assuming what you were doing.
The Node app isn’t going to have access to your d:\ drive so that’s not going to work. Our native instances all have psql so that is an option whether invoking psql programmatically or using it via the shell tab directly. But probably the simplest option would be to read the CSV file in Node and then insert it into the DB