From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Jim Cser <Cser(at)metro(dot)dst(dot)or(dot)us> |
Cc: | pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Granting COPY FROM access |
Date: | 2006-07-06 18:41:56 |
Message-ID: | 1152211316.13851.164.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2006-07-06 at 13:28, Jim Cser wrote:
> >>> Chris <dmagick(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-07-06 18:50:53 | Re: FOR from query - is it a bug ? |
Previous Message | Sandro Dentella | 2006-07-06 18:39:58 | Re: Form builder? |