Re: Remove trailing newlines from pg_upgrade's messages
От | Peter Eisentraut |
---|---|
Тема | Re: Remove trailing newlines from pg_upgrade's messages |
Дата | |
Msg-id | 1afc8f90-d795-c654-91e6-f58793ff3c01@enterprisedb.com обсуждение исходный текст |
Ответ на | Remove trailing newlines from pg_upgrade's messages (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Remove trailing newlines from pg_upgrade's messages
|
Список | pgsql-hackers |
On 14.06.22 20:57, Tom Lane wrote: > Hence, the patch below removes trailing newlines from all of > pg_upgrade's message strings, and teaches its logging infrastructure > to print them where appropriate. As in logging.c, there's now an > Assert that no format string passed to pg_log() et al ends with > a newline. This patch looks okay to me. I compared the output before and after in a few scenarios and didn't see any problematic differences. > This doesn't quite exactly match the code's prior behavior. Aside > from the buggy-looking newlines mentioned above, there are a few > messages that formerly ended with a double newline, thus intentionally > producing a blank line, and now they don't. I could have removed just > one of their newlines, but I'd have had to give up the Assert about > it, and I did not think that the extra blank lines were important > enough to justify that. In this particular patch, the few empty lines that disappeared don't bother me. In general, however, I think we can just fprintf(stderr, "\n") directly as necessary.
В списке pgsql-hackers по дате отправления: