T E Schmitz wrote: > I am trying to batch-load a tab-separated CSV file: > > psql -h lolek -U tes -d stockmarket -c "copy history from > '/tmp/FTSE.csv' CSV"; > > ERROR: could not open file "/tmp/FTSE.csv" for reading: No such file or > directory > > The file exists. Do I need to escape the quotes?
Is the server on the same machine that's running psql? If not, then this fails because it tries to open the file server-side. The suggested workaround is to use psql's \copy. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate