Re: COPY question - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: COPY question
Date
Msg-id 4CC0B077.7020700@iol.ie
Whole thread Raw
In response to COPY question  (Szymon Guz <mabewlun@gmail.com>)
Responses Re: COPY question  (Szymon Guz <mabewlun@gmail.com>)
List pgsql-general
On 21/10/2010 22:16, Szymon Guz wrote:
> Hi,
> I still get the same error while using COPY FROM 'file'. I have to pass
> the full directory for this to work, example:
>
> COPY first (a,b,c) FROM '1st_file.csv' with csv header delimiter ',';
> ERROR:  could not open file "1st_file.csv" for reading: No such file or
> directory
 >
> The same when I use: '.1st_file.csv' or './1st_file.csv'.
>
> No errors when I give the full path.

Yes, that's documented behaviour - you need to give the full path.


> Giving the full path is stupid, how can I use just the file name?

Why is it stupid?

Ray.



--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

pgsql-general by date:

Previous
From: Szymon Guz
Date:
Subject: COPY question
Next
From: Bruce Momjian
Date:
Subject: Re: Gripe: bytea_output default => data corruption