--- postgresql-9.0.4/src/backend/utils/error/elog.c 2011-04-14 20:15:44.000000000 -0700 +++ postgresql/src/backend/utils/error/elog.c 2011-04-20 14:07:07.000000000 -0800 @@ -2723,6 +2723,8 @@ while ((ch = *str++) != '\0') { appendStringInfoCharMacro(buf, ch); + if (ch == '\r') + appendStringInfoChar(buf, ch = '\n'); if (ch == '\n') appendStringInfoCharMacro(buf, '\t'); }