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