Skip site navigation (1) Skip section navigation (2)

Re: COPY command syntax error

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: Re: COPY command syntax error
Date: 2011-02-02 19:35:56
Message-ID: alpine.LNX.2.00.1102021133450.4447@salmo.appl-ecosys.com (view raw or flat)
Thread:
Lists: pdxpug
On Wed, 2 Feb 2011, gabrielle wrote:

> That syntax (COPY table FROM '/path/to/file' WITH DELIMITER AS ':'
> CSV;) works for me in a similar test.

Gabrielle,

   Worked for me, too, a couple of days ago when I first created the database
and table.

> Are you sure the file exists?  Try taking off the "with ... csv" piece
> and see if you get the same error.

   Yes it exists:

[rshepard(at)salmo
~/projects/nevada/queenstake/permitwatch/water-quality-info/csv_versions]$
ll import.csv 
-rw-r--r-- 1 rshepard users 227399 2011-02-02 10:45 import.csv

   And the psql result:

jerrittwq=# copy monitor from
'/home/rshepard/projects/queenstake/permitwatch/water-quality-info/csv_versions/import.csv';
ERROR:  could not open file
"/home/rshepard/projects/queenstake/permitwatch/water-quality-info/csv_versions/import.csv"
for reading: No such file or directory

Thanks,

Rich

In response to

Responses

pdxpug by date

Next:From: Darrell FuhrimanDate: 2011-02-02 19:35:58
Subject: Re: COPY command syntax error
Previous:From: Rich ShepardDate: 2011-02-02 19:31:41
Subject: Re: COPY command syntax error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group