Re: import CSV file

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: import CSV file
Дата
Msg-id 20070313222733.GE3285@alvh.no-ip.org
обсуждение исходный текст
Ответ на import CSV file  (T E Schmitz <mailreg@numerixtechnology.de>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "D'Arcy J.M. Cain"
Дата:
Сообщение: Re: import CSV file
Следующее
От: Jure Kodzoman
Дата:
Сообщение: Re: import CSV file