Problem with sql COPY command

Поиск
Список
Период
Сортировка
От Jon Asher
Тема Problem with sql COPY command
Дата
Msg-id 20040827220336.8EAED5E3631@svr1.postgresql.org
обсуждение исходный текст
Ответы Re: Problem with sql COPY command  (Doug McNaught <doug@mcnaught.org>)
Re: Problem with sql COPY command  (Richard Poole <rp@guests.deus.net>)
Re: Problem with sql COPY command  (Tino Wildenhain <tino@wildenhain.de>)
Список pgsql-general

Hi,

I'm trying to do a simple import of a comma delimited text file with COPY but it's returning an error.  The file has been granted all permissions in Linux, so it's not clear to me what the problem is.  Version 7.41 is installed... see below for details:

A comma delimited text file has been placed in a local directory with permissions set to allow any user to read or write to it:
/root/Desktop/server_transfer/WorldPoints_v2.txt'

I'm trying to use the COPY command to import this text file into a table from the PSQL command prompt.

First, open PSQL with parameters to open the right db:  psql my_database -h xxxx -U xxx

To import this file from the PSQL command line, call the COPY command:
copy public.world_stopwatch_v2 FROM '/root/Desktop/server_transfer/WorldPoints_v2.txt' using delimiters ',';

COPY fails with this error message:
could not open file "/root/Desktop/server_transfer/WorldPoints_v2.txt" for reading: Permission denied

(Database checked- it contains a table called: public.world_stopwatch_v2)

Thanks, Jon

 

В списке pgsql-general по дате отправления:

Предыдущее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: pg_autovacuum start-script
Следующее
От: Thomas F.O'Connell
Дата:
Сообщение: Re: pg_autovacuum start-script