I am trying to upload a large amount of dummy data into my pgadmin tables. I was able to use a csv for the smaller tables however I have a larger spreadsheet of data that includes descriptions (with punctuation marks like {'`, which could be causing the upload problem).

I am getting the below error message but I am unable to figure out what it means. I have went through the large bodies of text to remove any marks I think may have been causing it but I am still getting the same error.

Is there a better way to do this as the import tool seems to have a lot of bugs?

"C:\\Program Files (x86)\\pgAdmin 4\\v4\\runtime\\psql.exe" --command " "\\copy public.\"marineLifes\" (\"marineLifeID\", \"marineTypeID\", \"marineName\", \"marineDescription\") FROM 'C:/Users/JAMESG~1/Desktop/MARINE~1.CSV' CSV QUOTE '\"' ESCAPE '''';""

If you have a proper CSV file, with header row matching fields in existing table, you can import it this way:

  1. Open your CSV file in text editor

  2. Add this line as first line in file, just above header:

  1. Add this line (consisting only of COPY terminator) as the last line, just after last row:
  1. Save the file as tmp.sql.

  2. Run the file with psql:

C:\...\psql.exe -f C:\...\tmp.sql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.