Re: Granting COPY FROM access - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Granting COPY FROM access
Date
Msg-id 1152211316.13851.164.camel@state.g2switchworks.com
Whole thread Raw
In response to Granting COPY FROM access  ("Jim Cser" <Cser@metro.dst.or.us>)
List 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 by date:

Previous
From: Sandro Dentella
Date:
Subject: Re: Form builder?
Next
From: Michael Fuhr
Date:
Subject: Re: FOR from query - is it a bug ?