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