Re: Extending copy_expert

Поиск
Список
Период
Сортировка
Искать
От
Rich Shepard
Тема
Re: Extending copy_expert
Дата
Msg-id
alpine.LNX.2.11.1410121449020.25325@localhost
Ответ на
Extending copy_expert (Andrea Riciputi)
Список
Дерево обсуждения
Extending copy_expert Andrea Riciputi <andrea.riciputi@gmail.com>
Re: Extending copy_expert Adrian Klaver <adrian.klaver@aklaver.com>
Re: Extending copy_expert Adrian Klaver <adrian.klaver@aklaver.com>
Re: Extending copy_expert Andrea Riciputi <andrea.riciputi@gmail.com>
Re: Extending copy_expert Adrian Klaver <adrian.klaver@aklaver.com>
Re: Extending copy_expert Christophe Pettus <xof@thebuild.com>
Re: Extending copy_expert Daniele Varrazzo <daniele.varrazzo@gmail.com>
Re: Extending copy_expert Rich Shepard <rshepard@appl-ecosys.com>
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
FAQ