COPY from question

From: Slavisa Garic <Slavisa(dot)Garic(at)infotech(dot)monash(dot)edu(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: COPY from question
Date: 2004-02-03 00:55:31
Message-ID: Pine.GSO.4.10.10402031143460.19878-100000@bruce.csse.monash.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2004-02-03 01:05:44 Re: [HACKERS] What's left?
Previous Message Claudio Natoli 2004-02-03 00:41:58 Re: Why has postmaster shutdown gotten so slow?

Browse pgsql-performance by date

  From Date Subject
Next Message scott.marlowe 2004-02-03 01:18:32 Re: [PERFORM] MySQL+InnoDB vs. PostgreSQL test?
Previous Message Christopher Kings-Lynne 2004-02-03 00:44:32 Re: MySQL+InnoDB vs. PostgreSQL test?