Re: About "ERROR: must be *superuser* to COPY to or from a file"

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: emilu(at)cs(dot)concordia(dot)ca
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: About "ERROR: must be *superuser* to COPY to or from a file"
Date: 2005-08-26 20:58:03
Message-ID: m2pss0o1pg.fsf@Douglas-McNaughts-Powerbook.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Emi Lu <emilu(at)cs(dot)concordia(dot)ca> writes:

> Greetings,
>
> I met a question about Copy. I tried to run :
> copy test(studid) from '/myownDIR/a.txt';
>
> But I got an error as the following:
> ERROR: must be *superuser* to COPY to or from a file
>
> May I know is it possible that instead of supervuser, regular users
> are able to use COPY as well?

You can use \copy in 'psql' on the client side, but you have to be a
superuser to do COPY on the server side, for security reasons.

If you are not using 'psql' and your client library supports it, you
can use 'COPY FROM stdin' and pass the data across the client
connection.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message vishal saberwal 2005-08-26 21:03:05 Re: PQConnectdb SSL (sslmode): Is this a bug
Previous Message vishal saberwal 2005-08-26 20:57:36 Re: PQConnectdb SSL (sslmode): Is this a bug