pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
copy error
3+ messages / 2 participants
[nested] [flat]

* copy error
@ 2005-10-25 19:57  reiner peterke <zedaardv@drizzle.com>
  0 siblings, 1 reply; 3+ messages in thread

From: reiner peterke @ 2005-10-25 19:57 UTC (permalink / raw)
  To: pgsql-php; pgsql-php; pgsql-php

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: copy error
@ 2005-10-25 20:33  David Stanaway <david@stanaway.net>
  parent: reiner peterke <zedaardv@drizzle.com>
  0 siblings, 1 reply; 3+ messages in thread

From: David Stanaway @ 2005-10-25 20:33 UTC (permalink / raw)
  To: reiner peterke <zedaardv@drizzle.com>; +Cc: pgsql-php

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
> 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: copy error
@ 2005-10-26 20:45  reiner peterke <zedaardv@drizzle.com>
  parent: David Stanaway <david@stanaway.net>
  0 siblings, 0 replies; 3+ messages in thread

From: reiner peterke @ 2005-10-26 20:45 UTC (permalink / raw)
  To: David Stanaway <david@stanaway.net>; +Cc: pgsql-php

thanks for all the input.

it's workng now, but i don't really know what the problem was.  i moved 
the file out from the data dir.  tried it, then after trying your 
suggestions and they worked, moved ti back into the data dir and now it 
loaded fine.

i'm confused, but er, at least it's working.

r

On 25 okt 2005, at 22.33, David Stanaway wrote:

> 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
>>
>
>
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-10-26 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-25 19:57 copy error reiner peterke <zedaardv@drizzle.com>
2005-10-25 20:33 ` David Stanaway <david@stanaway.net>
2005-10-26 20:45   ` reiner peterke <zedaardv@drizzle.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox