copy command problem - Mailing list pgsql-general
From | Don Isgitt |
---|---|
Subject | copy command problem |
Date | |
Msg-id | 3FE09DD5.60800@soundenergy.com Whole thread Raw |
Responses |
Re: copy command problem
|
List | pgsql-general |
Hi, I am recreating a database and its applications onto a new server and new software; old version of pg was 7.2.4 and new version is gds2=# select version(); version -------------------------------------------------------------------------------------------------------- PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-20) I am having trouble with the copy command as follows: gds2=# copy survey_match from '/home/djisgitt/perl/fixsvy.dat' with delimiter as '>'; ERROR: could not open file "/home/djisgitt/perl/fixsvy.dat" for reading: Permission denied File sysem permissions are [djisgitt@dbserver perl]$ ls -l /home/djisgitt/perl/fixsvy.dat -rwxrwxrwx 1 djisgitt djisgitt 198441 Nov 5 12:35 /home/djisgitt/perl/fixsvy.dat Table definition is gds2=# \d survey_match Table "public.survey_match" Column | Type | Modifiers --------+------+----------- oldsvy | text | oldblk | text | newsvy | text | newblk | text | First few lines of file are: [djisgitt@dbserver perl]$ head -5 fixsvy.dat >43 >H&TC >43 >OS2 > / E CHAPMAN >KL >TCRR /E CHAPMAN >KL >TCRR 133 >133 >133 and in hex... 0000000 > 4 3 2020 2020 2020 2020 2020 2020 343e 2033 0000020 > H & T C 2020 2020 3e20 2648 4354 2020 2020 2020 0000040 > 4 3 \n 2020 343e 0a33 2020 2020 2020 2020 2020 0000060 > O S 2 > \n / E 2020 4f3e 3253 2020 2020 3e20 2f0a 4520 0000100 C H A P M A N > K L 4320 4148 4d50 4e41 3e20 4c4b 2020 2020 0000120 > T C R R \n / E C H A P M 2020 543e 5243 0a52 452f 4320 4148 4d50 0000140 A N > K L > T C 4e41 2020 4b3e 204c 2020 2020 3e20 4354 0000160 R R \n 1 3 3 > 5252 310a 3333 2020 2020 2020 2020 3e20 0000200 1 3 3 > 1 3 3 \n Only two defined users are both superusers gds2=# select * from pg_shadow; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig ----------+----------+-------------+----------+-----------+--------+----------+----------- postgres | 1 | t | t | t | | | djisgitt | 100 | t | t | t | | | (2 rows) I tried a similar thing with a different table and input file with identical results. What am I doing wrong? Yes, I read the copy documentation for 7.4. Thank you for your assistance. Don n.b. Implicitly stated but not declared: yes, this worked on 7.2.4 with "with" replaced by "using" and "delimiter" replaced by "delimiters".
pgsql-general by date: