Missing newlines in error messages
While poking around the pg_basebackup code, I noticed there are a lot of
error messa
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
(oops, accidental send button press)
While poking around the pg_basebackup code, I noticed there are a lot of
error messages are missing the \n at the end. Most of them are very
unlikely to happen, but in general I believe all error messages we print to
stderr from those binaries should have a newline at the end.
Is that wrong? :)
Second -- if we were to backpatch something like the attached patch, is
that going to cause issues for translators?
On Thu, Dec 15, 2016 at 4:33 PM, Magnus Hagander <magnus@hagander.net>
wrote:
While poking around the pg_basebackup code, I noticed there are a lot of
error messa--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
Attachments:
missing_newlines.patchtext/x-patch; charset=US-ASCII; name=missing_newlines.patchDownload+33-33
Magnus Hagander <magnus@hagander.net> writes:
While poking around the pg_basebackup code, I noticed there are a lot of
error messages are missing the \n at the end. Most of them are very
unlikely to happen, but in general I believe all error messages we print to
stderr from those binaries should have a newline at the end.
Is that wrong? :)
I think you missed the fact that PQerrorMessage's result will already
end with a newline. So most (not all) of these look OK as they stand.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Dec 15, 2016 at 4:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Magnus Hagander <magnus@hagander.net> writes:
While poking around the pg_basebackup code, I noticed there are a lot of
error messages are missing the \n at the end. Most of them are very
unlikely to happen, but in general I believe all error messages we printto
stderr from those binaries should have a newline at the end.
Is that wrong? :)
I think you missed the fact that PQerrorMessage's result will already
end with a newline. So most (not all) of these look OK as they stand.
Ha, I knew there was something. But somehow I forgot about that one. I was
wondering why nobody had found it before :)
And yeah, that leaves just the one error that I actually bumped into. I'll
go ahead and apply that one alone then.
Pah. Less coding on jetlag.
Thanks!
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/