Re: ERROR: must be superuser to COPY to or from a file
| От | Kamchybek Jusupov | 
|---|---|
| Тема | Re: ERROR: must be superuser to COPY to or from a file | 
| Дата | |
| Msg-id | A50E9AA0-F494-4BA4-87FB-9A82A8C6BEA1@gmail.com обсуждение исходный текст | 
| Ответ на | ERROR: must be superuser to COPY to or from a file ("Jorge Alberto" <csnmgeek@gmail.com>) | 
| Список | pgsql-novice | 
there is more than a way to skin a cat... CREATE TABLE table1 ( code char(5), name char(10) ); synack@deimos db $ cat /tmp/tt.txt 1,kamchi 2,mahabat 3,kamila postgres@deimos ~ $ cat /tmp/tt.txt | psql -h localhost -d tt -c "copy table1 from stdin delimiter ',';" postgres@deimos ~ $ psql -d tt -c "select * from table1;" code | name -------+------------ 1 | kamchi 2 | mahabat 3 | kamila (3 rows) Rgds, Kamchybek Jusupov kjusupov@gmail.com On Sep 29, 07, at 3:40 AM, 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? > > >
В списке pgsql-novice по дате отправления: