Menu

Permission Denied error when using PostgreSQL’s COPY FROM/TO command

The other day I tried to import a CSV record of data via PGAdmin4. The total number of records is ~300,000.

Setup

  • Django Project
  • Postgres
  • PGAdmin4

Goal

  • Import CSV data via PGAdmin4 and populate database schema

What I did

  • Run PGAdmin4 as administrator
  • Create a DB table
  • Use COPY FROM $schema ‘path to CSV file’ delimiter ‘;’ header;
  • Execute the query

Issue

  • Permission Denied

Solution

  • Go to your CSV file right click and add “everyone”
  • Grant all permission to the user by clicking on all Checkboxes
  • Done
wanikwai
wanikwai

A christian & dad to Mireya and Jnr. I write occasionally about technology on this website.

Articles: 25

Share your thoughts

Discover more from Watson Anikwai

Subscribe now to keep reading and get access to the full archive.

Continue reading