thanks for your answer:
the command \copy works but the syntax is different
mydb=> \copy weather FROM "/home/fideito/weather.txt";
"/home/fideito/weather.txt";: No such file or directory
mydb=> \copy weather FROM "/home/fideito/weather.txt"
"/home/fideito/weather.txt": No such file or directory
mydb=> \copy weather FROM /home/fideito/weather.txt
I have to delete the "" and the ";" to make it work.
Do you know why is that?
On 9/28/07, Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> wrote:
> 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.
In response to
pgsql-novice by date
|Next:||From: Richard Broersma Jr||Date: 2007-09-28 20:26:55|
|Subject: Re: ERROR: must be superuser to COPY to or from a file|
|Previous:||From: Richard Broersma Jr||Date: 2007-09-28 20:05:57|
|Subject: Re: Why is my view ddl being altered by postgres?|