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

COPY command syntax error

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: COPY command syntax error
Date: 2011-02-02 19:19:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pdxpug
   I'm trying to import data from a .csv file into an existing table. It
worked the first time I loaded data into this table.

   I'm invoking psql from the same directory as the import.csv file. The command I'm using,
and the results are:

jerrittwq=# copy monitor from
with delimiter as ':' csv;
ERROR:  could not open file
for reading: No such file or directory

   Doesn't matter how I specify the file's location (full path or cwd). Do I
also need to specify the text delimeters with quote as '''? (The command
line does not like my using double quotes to delimit the single quote.)

   What do I have syntactically wrong here?



pdxpug by date

Next:From: Darrell FuhrimanDate: 2011-02-02 19:23:15
Subject: Re: COPY command syntax error
Previous:From: gabrielleDate: 2011-01-21 03:25:53
Subject: Re: Misusing yet another mailing list

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