Thread: ERROR: COPY FROM
FROM
From
Kumar S
Date:
Dear group,
 I am trying to upload a file into a table using COPY
command.


My table:

exp_id   exp_X   exp_y  exp_std   exp_npix





My file:
CellHeader=X    Y    MEAN    STDV    NPIXELS




My sql statement:
create table EXPERIMENT
(
        exp_id          serial  not null,
        exp_name        varchar(32)     not null,
        con_id          serial  references
contacts(con_id),
        exp_type        varchar(32)     not null,
        exp_desc        varchar(64),
        exp_pmid        integer         not null,
        exp_rawdata_url varchar(32),
        constraint      experiment_pk primary
key(exp_id)
);




My copy statement:

marray2=> COPY  affy_exp from
'/home/speri/temp/postgres/marray2/tm.cel';
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.
marray2=>


Could any help me whats going wrong with this COPY and
\copy (two different commands).

Thanks

Kumar




_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

FROM
From
"M. Bastin"
Date:
>marray2=> COPY  affy_exp from
>'/home/speri/temp/postgres/marray2/tm.cel';
>ERROR:  must be superuser to COPY to or from a file

This means you must log in to pgsql with enough privileges, e.g. as
the user 'postgres'

Marc