PostgreSQL - inconsistent COPY permissions errors

前端 未结 3 1814
既然无缘
既然无缘 2021-01-14 20:24

I am using the EnterpriseDB pgAdmin III (v. 1.12.1) on a Windows 7, 32-bit machine to work with PostgreSQL databases on a remote Linux server. I am logged in as the user pos

3条回答
  •  無奈伤痛
    2021-01-14 21:05

    Try \COPY table_name FROM '/var/lib/pgsql/data/file.csv' 
    WITH DELIMITER AS ',' csv header
    

    Notice the backslash before copy, when you run it with back slash it runs with user permissions other wise it just runs as postmaster which in the documentation is deprecated for recent versions of pg :|, anyways this might probably do the trick for ya .

提交回复
热议问题