Re: [GENERAL] PostgreSQL COPY Statement Error On Linux

Поиск
Список
Период
Сортировка
От Francisco Olarte
Тема Re: [GENERAL] PostgreSQL COPY Statement Error On Linux
Дата
Msg-id CA+bJJby-N49qifYNOiK0Kkp3VgdjxQ9X1kfs9yy4jyLksr=nGg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] PostgreSQL COPY Statement Error On Linux  (George Neuner <gneuner2@comcast.net>)
Список pgsql-general
George:

On Tue, Sep 12, 2017 at 6:40 PM, George Neuner <gneuner2@comcast.net> wrote:
> 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.

That's not strictly correct. Linus understand backslahes in paths
fine, they are just not a directory separator ( there are only two
reserved byte values in path names, IIRC, slash for dir sep and nul
for string end, C issues ). Windows, OTOH, inherits path separator
logic from MSDOS 2.0, and if it hasn't changed in the last fifteen
years treats any slash as a separator.

But the issue is that windos treats a \\netname\resource prefix as a
network request, and transform it internally, while linux does not. In
*ix you have to connect to
the machine and mount its resources first, similarly to what you do
with local disks. Normally //x is treated the same as /x, or as ////x:

folarte@n:~$ ls -ldi /tmp //tmp ///tmp
655361 drwxrwxrwt 14 root root 45056 Sep 12 19:17 /tmp
655361 drwxrwxrwt 14 root root 45056 Sep 12 19:17 //tmp
655361 drwxrwxrwt 14 root root 45056 Sep 12 19:17 ///tmp

Francisco Olarte.


-- 
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 по дате отправления:

Предыдущее
От: George Neuner
Дата:
Сообщение: Re: [GENERAL] PostgreSQL COPY Statement Error On Linux
Следующее
От: ""
Дата:
Сообщение: Re: [GENERAL] Perl script is killed by SIGPIPE