Re: ERROR: must be superuser to COPY to or from a file

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Re: ERROR: must be superuser to COPY to or from a file
Дата
Msg-id 46FD5CCB.50708@mail.nih.gov
обсуждение исходный текст
Ответ на ERROR: must be superuser to COPY to or from a file  ("Jorge Alberto" <csnmgeek@gmail.com>)
Ответы Re: ERROR: must be superuser to COPY to or from a file  ("Jorge Alberto" <csnmgeek@gmail.com>)
Список pgsql-novice
Jorge Alberto wrote:
> Hello
> I want to fill in a table from a file, but when I use the COPY command I
> get the following error:
>
> mydb=> COPY weather FROM '/home/fideito/weather.txt';
> ERROR:  must be superuser to COPY to or from a file
> HINT:  Anyone can COPY to stdout or from stdin. psql's \copy command
> also works for anyone.
>
> But, what can I do if I'm not root?

Use \copy (as the error message suggests) rather than copy.  That should
do it.

Sean

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

Предыдущее
От: "Jorge Alberto"
Дата:
Сообщение: ERROR: must be superuser to COPY to or from a file
Следующее
От: Kamchybek Jusupov
Дата:
Сообщение: Re: ERROR: must be superuser to COPY to or from a file