Re: ERROR: relative path not allowed for COPY to file

From: Michael Shapiro <mshapiro51(at)gmail(dot)com>
To: "Katona, Steve" <SKatona(at)begavalley(dot)nsw(dot)gov(dot)au>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: ERROR: relative path not allowed for COPY to file
Date: 2013-02-15 02:47:49
Message-ID: CAGCvxeYBAh2xP6uUaVW1b=-1oLAbKfaNDmTGwWz7p8WakeZYyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

It might be the /
Try \ instead

On Thu, Feb 14, 2013 at 8:43 PM, Katona, Steve <
SKatona(at)begavalley(dot)nsw(dot)gov(dot)au> wrote:

> I am using pgAdmin 14.1 and then tried with pgAdmin 16.1****
>
> ** **
>
> I have tried:****
>
> COPY (select * from file) TO '”C:/Dev/test.csv”';****
>
> ** **
>
> And get the error:****
>
> ERROR: relative path not allowed for COPY to file****
>
> SQL state: 42602****
>
> ** **
>
> Also, when I try:****
>
> COPY temp_import FROM
> E'"C:/Dev/exponare_data_mgr/exponare_filelist.txt"';****
>
> I get the following error:****
>
> ERROR: could not open file
> ""C:/Dev/exponare_data_mgr/exponare_filelist.txt"" for reading: No such
> file or directory****
>
> SQL state: 58P01****
>
> ** **
>
> I suspect that pgAdmin is not passing the filename in a manner, that the
> shell on windows7 ,interprets correctly.****
>
> I have also tried the same commands from the psql console and achieve the
> same results.****
>
> ** **
>
> Under linux the commands work well.****
>
> Is there a suggestion for things I change/check to get COPY to work?****
>
> Cheers****
>
> Steven ****
>
> Check out all the latest news and events at Council on
> www.begavalley.nsw.gov.au.
>
>
> _____________________________________________________________________
> This e-mail has been scanned for viruses by MCI's Internet Managed
> Scanning Services - powered by MessageLabs. For further information
> visit http://www.mci.com
>

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Katona, Steve 2013-02-15 02:56:28 Re: ERROR: relative path not allowed for COPY to file
Previous Message Katona, Steve 2013-02-15 02:43:47 ERROR: relative path not allowed for COPY to file