Permission denied when trying to import a CSV file from PGAdmin

后端 未结 7 920
轻奢々
轻奢々 2020-11-28 07:20

I\'m using PGAdmin 1.14.3.

When I try to execute an import command:

COPY grad(country_code, postal_code, place_name, admin_name1, admin_code1, admin_         


        
7条回答
  •  难免孤独
    2020-11-28 07:48

    Ok, this is how got COPY command working,to export a table to CSV, step by step. Pls note that I am using pgAdmin 111.

    1. Create the target folder you want to export a table to. E.g C:\myExports
    2. Set a read/write permission on this folder following the steps below :

    Right click the folder containing the data file(s) that permission was denied >to and then click Properties.

    In the Folder's Properties window, select the Security tab. Click the Edit button.

    In the "Permissions for the folder" window that opened, click the Add... button. Type Everyone into the "Enter the object names to select" text area box.

    Click OK and the window will close. Verify that the default Read & Execute permissions were set to Allow via the >check checkbox in the previous window. Click OK and the window will close.

    Click the Apply button in the Folder Properties window.

    1. This is the tricky part, inside myExports folder create a blank CSV file with your desired name.E.g employee.csv

    2. Then run the Copy command like this :

      copy employee to 'C:\myExports\employee.csv' delimiter ',' csv;

    employee is the table name in this example..

    Hope this helps.

提交回复
热议问题