Tagged Questions
2
votes
1answer
7k views
How to import a.csv file into a postgresql database using \copy?
I am trying to import a .csv file into a postgresql database. I am using pgadmin III for that on a win7 machine.
My query looks like that:
\COPY pop_grid(GRID_ID, POP_TOT, YEAR, METHD_CL, CNTR_CODE, ...
3
votes
1answer
4k views
psql denies access to file when using COPY FROM
When I do this:
COPY "mytable" FROM '/my/file.csv' WITH DELIMITER AS ',' CSV;
On this:
-rw-r--r-- 1 peter peter 54819176 2011-07-21 13:17 file.csv
psql tells me this:
ERROR: could not open ...