Re: Granting COPY FROM access

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Granting COPY FROM access
Дата
Msg-id 1152211316.13851.164.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Granting COPY FROM access  ("Jim Cser" <Cser@metro.dst.or.us>)
Список pgsql-general
On Thu, 2006-07-06 at 13:28, Jim Cser wrote:
> >>> Chris <dmagick@gmail.com> 07/05/06 7:49 PM >>>
>
> >Are you trying from a file or stdin? What error message do you get
> when
> >you try?

> As I mentioned above, I am loading CSV files, and yes, I do read
> documentation. It all works just fine as a superuser, I just wanted to
> know if the COPY permission is enabled with GRANT SELECT.  I'm sending
> SQL statemens through ODBC, so the stdin or \copy options aren't quite
> what I need.
>
> This was the error message:
> 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.

The problem isn't permission for copy, it permission to access files.
only the super user can access the file system through pgsql, because of
security concerns.

copy can be run by anybody.  copy from/to a FILE can only be done by the
super user.

Have you tried queueing up copy from stdin and a stream of data and \.
in ODBC?  I'm pretty sure that'll work, but I've never tried it.

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

Предыдущее
От: Sandro Dentella
Дата:
Сообщение: Re: Form builder?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: FOR from query - is it a bug ?