Granting COPY FROM access

From: "Jim Cser" <Cser(at)metro(dot)dst(dot)or(dot)us>
To: <pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Granting COPY FROM access
Date: 2006-07-06 20:30:21
Message-ID: s4ad1088.010@metro.dst.or.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>> Scott Marlowe <smarlowe(at)g2switchworks(dot)com> 07/06/06 1:23 PM >>>
On Thu, 2006-07-06 at 15:03, Jim Cser wrote:
> >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.
>
> I imagine that your solution would work, but the larger issue is that
I
> am sending the SQL from an R program, and not using the psql console.
I
> could launch it the console programmatically and send copy commands
to
> it, but that's just adding more moving parts. Having everyone be a
> superuser is good enough for now, thanks anyway.

>p.s., you may be thinking of \copy, which isn't the same as copy
from...
>just fyi...

>You don't need the psql console, that's what I've been trying to say.

>I do this stuff routinely in php and other languages.

>Note that if R is generating this data from postgresql to begin with,
>you might be better off with pl/R

Sorry, I was just confused over what exactly "stdin" means. I'll go
back to the R docs and find out how to stream data.

-Jim Cser

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2006-07-06 20:56:31 Re: OLEDB connection does not want to work. Help!!
Previous Message Joseph Shraibman 2006-07-06 20:24:43 Re: RAID + PostgreSQL?