"Eric Matthew Finnin" <emf(dot)storage(at)gmail(dot)com> writes:
> Apparently, you can't use the COPY command to copy a whole file
> without being a super user?
You can, but not like that. The point of the restriction is that the
database may be running on a different machine from where the user is,
and non-superusers shouldn't have access to the filesystem that the
database can see. "COPY FROM 'filename'" is a server-side operation
and reads the server's filesystem, so it's allowed only to superusers.
However, psql (and probably most other client-side tools) have a way
to read from the client's filesystem and shove the data across the
network to a COPY FROM STDIN command. In psql what you want is to
use the \copy command --- see the psql reference page for details.
regards, tom lane
In response to
pgsql-novice by date
|Next:||From: Reza Razavipour||Date: 2006-04-18 20:42:59|
|Subject: Maximum database size|
|Previous:||From: George Young||Date: 2006-04-18 17:59:00|
|Subject: Re: Find all foreign keys and dropping them from a script.|