Re: Extending copy_expert

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Extending copy_expert
Дата
Msg-id alpine.LNX.2.11.1410121449020.25325@localhost
обсуждение исходный текст
Ответ на Extending copy_expert  (Andrea Riciputi <andrea.riciputi@gmail.com>)
Список psycopg
On Sun, 12 Oct 2014, Andrea Riciputi wrote:

> However the target software for which the file is produced, is, let say,
> “legacy” software and can only accept CRLF as EOL character. However by
> calling COPY TO STDOUT from psycopg ends up in a CSV file with LF as EOL
> forcing us to pass the file a second time to convert EOL, which is
> inconvenient. Plus, doing it in Python, make it a little bit to slow.

Andrea,

   How about using unix2dos or todos? These linux utilities translate line
endings. When I get client data in text form with the CR/LF ends I translate
them to LF (\n) with fromdos (or the older flavor called dos2unix). It's
quick, but I've not tried them on a 500G file.

HTH,

Rich


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

Предыдущее
От: Andrea Riciputi
Дата:
Сообщение: Extending copy_expert
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Extending copy_expert