Andrew Dunstan <andrew@dunslane.net> writes:
> OK, I now have a complete handle on what's going on here, and withdraw
> my earlier statement that I am confused on this issue :-)
> First, one lot of CRs is produced because the pg_upgrade test script
> calls pg_dumpall without -f and redirects that to a file, which Windows
> kindly opens on text mode. The solution to that is to change the test
> script to use pg_dumpall -f instead.
> The second lot of CRs (seen in the second dump file in the diff i
> previously sent) is produced by pg_upgrade writing its output in text
> mode, which turns LF into CRLF. The solution to that is the patch to
> dump.c I posted, which, as Bruce observed, does the same thing that
> pg_dumpall does. Arguably, it should also open the input file in binary,
> so that if there really is a CRLF in the dump it won't be eaten.
+1 to all the above. Do we want to risk squeezing this into 9.2.0,
or is it better to delay?
> Another question is whether or not pg_dumpall (and pg_dump in text mode
> too for that matter) should be trying to suppress newline translation on
> its output even to stdout.
I'm inclined to think not - we've not heard any complaints from Windows
users about its current behavior, and it's been like that forever.
regards, tom lane