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

Re: COPY command syntax error

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pdxpug(at)postgresql(dot)org
Subject: Re: COPY command syntax error
Date: 2011-02-02 19:23:47
Message-ID: 1296674627.18411.55.camel@jd-desktop (view raw, whole thread or download thread mbox)
Lists: pdxpug
On Wed, 2011-02-02 at 11:19 -0800, Rich Shepard wrote:
> 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
> '/home/rshepard/projects/queenstake/permitwatch/water-quality-info/csv_versions/import.csv'
> with delimiter as ':' 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
>    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?

Is the file readable by the user that runs the postgresql daemon? (the
complete path)


> Rich

-- Major Contributor
Command Prompt, Inc: - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering |

In response to


pdxpug by date

Next:From: Rich ShepardDate: 2011-02-02 19:28:11
Subject: Re: COPY command syntax error
Previous:From: Darrell FuhrimanDate: 2011-02-02 19:23:15
Subject: Re: COPY command syntax error

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