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

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Jorge Alberto <csnmgeek(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: ERROR: must be superuser to COPY to or from a file
Date: 2007-09-28 19:58:03
Message-ID: 46FD5CCB.50708@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Jorge Alberto wrote:
> Hello
> I want to fill in a table from a file, but when I use the COPY command I
> get the following error:
>
> mydb=> COPY weather FROM '/home/fideito/weather.txt';
> 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.
>
> But, what can I do if I'm not root?

Use \copy (as the error message suggests) rather than copy. That should
do it.

Sean

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Kamchybek Jusupov 2007-09-28 20:04:36 Re: ERROR: must be superuser to COPY to or from a file
Previous Message Jorge Alberto 2007-09-28 19:40:03 ERROR: must be superuser to COPY to or from a file