X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 02C1ADAE37 for ; Tue, 25 Oct 2005 17:33:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12389-10 for ; Tue, 25 Oct 2005 20:33:47 +0000 (GMT) Received: from mail.dialmex.net (67.107.77.98.ptr.us.xo.net [67.107.77.98]) by svr1.postgresql.org (Postfix) with ESMTP id C7868DAE6C for ; Tue, 25 Oct 2005 17:33:48 -0300 (ADT) Received: from david.dialmex.net (dmxnocws13.dialmex.net [67.107.77.78]) by mail.dialmex.net (Postfix) with ESMTP id E87C2EE98E; Tue, 25 Oct 2005 15:33:49 -0500 (CDT) Subject: Re: copy error From: David Stanaway To: reiner peterke Cc: pgsql-php@postgresql.org In-Reply-To: References: Content-Type: text/plain Date: Tue, 25 Oct 2005 15:33:49 -0500 Message-Id: <1130272429.7471.8.camel@dmxnocws13.dialmex.net> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/45 X-Sequence-Number: 3313 Hello Reiner, What you need to check is that the user that the postmaster is running as can access where you have the file. Maybe you have a private home directory for your user account? Also, check the permissions of the file. It is the postmaster that opens the file in the copy command, not the client (psql or the PHP module for instance). One way to test this: sudo -u postgres head ~/data/pg_nor.out assuming that the postmaster is running as user postgres On Tue, 2005-10-25 at 21:57 +0200, reiner peterke wrote: > either i'm trying to hard or something is wrong here. > > i have 2 postgres installations one at work 8.0.4 on windows xp and one > at home on os x 10.3.9 and postgres 8.0.3. i took a data file and > loaded into the installation at work with the copy command. but when > i try the same thing here on my os x installation i get the following > error. > > ERROR: could not open file "data/pg_nor.out" for reading: No such file > or directory > > the command i run is > > copy mig_equip from 'data/pg_nor.out' using delimiters '|' with null as > ''; > > the command i used at work was > > copy mig_equip from 'c:/tmp/pg_nor.out' using delimiters '|' with null > as ''; > > the only difference being the location of the file. > > i've tried changing the location, ran with the full path, did chmod on > the file, ran dos2unix to make sure that the was not a problem with the > file format. so i'm stumped. > i'm afraid i'm missing something obvious but i can't figure it out. > > any ideas? > > thanks. > > reiner > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings >