Thread: COPY command on windows???

COPY command on windows???

From
Andreas
Date:
Hi,
I'd like to read a csv file into PG 8.4.

COPY relations FROM E'd:\\relations.csv' CSV HEADER;

It throws (translated):
ERROR: can't open file >>d:\relations.csv<< for reading
file or directory not found

The PG doc doesn't describe the path-syntax for windows.
With google I only find references to permission errors.


Re: COPY command on windows???

From
Thomas Kellerer
Date:
Andreas wrote on 17.07.2009 20:06:
> Hi,
> I'd like to read a csv file into PG 8.4.
>
> COPY relations FROM E'd:\\relations.csv' CSV HEADER;
>
> It throws (translated):
> ERROR: can't open file >>d:\relations.csv<< for reading
> file or directory not found

Try

COPY relations FROM 'd:/relations.csv' CSV HEADER;