Hi,
I have a question about the COPY statement. I am using PGSQL(7.3.4) with
python-2.3 on RedHat v8 machine. The problem I have is the following.
Using pg module in python I am trying to run the COPY command to populate
the large table. I am using this to replace the INSERT which takes about
few hours to add 70000 entries where copy takes minute and a half. Now
these stats come from the NetBSD machine I also use which doesn't have
this problem but has same python and same pgsql installed.
My understanding is that COPY workes FROM 'filename' or STDIN where the
last characters are '.\\n'. I tried using the copy from 'filename' and as
I said NetBSD is not complaining where I get the following error on Linux
machine even if permissions on the data file are 777:
_pg.error: ERROR: COPY command, running in backend with effective uid 26, could not open file
'/home/slavisa/.nimrod/experiments/demo/ejdata'for reading. Errno = Permission denied (13).
I can't figure out why would this be occuring so I wanted to switch to
FROM STDIN option but I got stuck here due to lack of knowledge I have to
admit.
What I would like to ask anyone who knows anything about this. If you know
what the problem is with FROM file option or you know how to get COPY FROM
STDIN working from within the python (or any other) program, help would be
greatly appreciated,
Regards,
Slavisa