Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

Поиск
Список
Период
Сортировка
От George Neuner
Тема Re: [GENERAL] PostgreSQL COPY Statement Error On Linux
Дата
Msg-id o23grcp82cvnjs4m6sk52d00eu8cl0mgvu@4ax.com
обсуждение исходный текст
Ответ на [GENERAL] PostgreSQL COPY Statement Error On Linux  (Osahon Oduware <osahon.gis@gmail.com>)
Ответы Re: [GENERAL] PostgreSQL COPY Statement Error On Linux  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-general
On Tue, 12 Sep 2017 11:30:02 +0100, Osahon Oduware
<osahon.gis@gmail.com> wrote:

>I am trying to utilize the "COPY" statement below to copy a .CSV file to a
>table in a PostgreSQL database.:
>    *COPY <schema>.<table_name>(<table_columns>) FROM
>'\\shared\network\path\to\csv\test.csv' DELIMITER ',' CSV HEADER;*
>
>This works with a PostgreSQL database installed in a WINDOWS environment
>(Windows 7), but fails with the following error with a similar PostgreSQL
>database in a Linux environment (Centos 7):
>    *org.postgresql.util.PSQLException: ERROR: could not open file
>"\\shared\network\path\to\csv\test.csv" for reading: No such file or
>directory*
>

Francisco already pointed out that Linux doesn't understand the
backslashes in the file path, however it should be noted that Windows
*does* understand forward slashes and that [modulo disk names in
Windows] you can use forward slash paths on both systems.

George



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: [GENERAL] contrecord is requested
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: [GENERAL] PostgreSQL COPY Statement Error On Linux