| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> | 
|---|---|
| To: | Daniel Gustafsson <daniel(at)yesql(dot)se> | 
| Cc: | Michael Banck <michael(dot)banck(at)credativ(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net> | 
| Subject: | Re: pg_basebackup: Missing newlines in some error messages | 
| Date: | 2018-03-21 12:46:31 | 
| Message-ID: | 20180321124631.rdndu36adbc4wnvw@alvherre.pgsql | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Daniel Gustafsson wrote:
> > On 21 Mar 2018, at 13:12, Michael Banck <michael(dot)banck(at)credativ(dot)de> wrote:
> 
> > while working on something else, I noticed that some error messages in
> > pg_basebackup do not have a "\n" at the end, resulting in output like:
> > 
> > |pg_basebackup: could not get COPY data stream: pg_basebackup: removing
> > |data directory “data2"
> 
> There seems to be a few more in the other files, for example this (and more) in
> receivelog.c:
> 
> -               fprintf(stderr, _("%s: could not send feedback packet: %s"),
> +               fprintf(stderr, _("%s: could not send feedback packet: %s\n"),
> 
> Should they get newlines appended as well?
Note that PQerrorMessage already appends a newline, so if the %s at the
end comes from that, the newline is purposely missing.
-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Banck | 2018-03-21 12:49:01 | Re: pg_basebackup: Missing newlines in some error messages | 
| Previous Message | Teodor Sigaev | 2018-03-21 12:35:56 | Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug |