Re: problems with copy

From: Doug McNaught <doug(at)wireboard(dot)com>
To: "Steff" <stephane(dot)eveillard(at)netcourrier(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problems with copy
Date: 2001-02-24 17:26:37
Message-ID: m3lmqw0z76.fsf@belphigor.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Steff" <stephane(dot)eveillard(at)netcourrier(dot)com> writes:

> I'm starting using PostgreSQL and want to import datas from my old database.
> I've made ASCII delimited files and want to use the copy instruction.
>
> Having the server started, I do the following :
>
> > psql mydb
> >copy table from 'myfile' using delimiters ';' ;
>
> I'vegot an error saying that the backend server can't read myfile. I've
> check rights on this file and every user can read this file.
> I've created the table and checked that it exists.

Some possibilities:

* The backend can't find the file because you're using a relative
pathname. Try using an absolute pathname (one that starts with
'/'). The backend has its own working directory, which is generally
different from that of the 'psql' process.
* The 'postgres' user doesn't have read/search permission on one of
the directories leading to the file (eg, if /home/doug is not
world-searchable, no other user can read /home/doug/myfile, no
matter what permissions are on 'myfile' itself).

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2001-02-24 17:29:09 Re: Re: postmaster question
Previous Message Doug McNaught 2001-02-24 17:11:51 Re: PostgreSQL packages for Debian potato