Re: Increase footprint of %m and reduce strerror() - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Increase footprint of %m and reduce strerror()
Date
Msg-id 20191204.153211.254366568833808068.horikyota.ntt@gmail.com
Whole thread Raw
In response to Increase footprint of %m and reduce strerror()  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Increase footprint of %m and reduce strerror()  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
At Fri, 29 Nov 2019 15:51:15 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> Hi all,
> 
> Since commit d6c55de1, we support %m in the in-core port for printf
> and such.  And it seems to me that we could do better for the frontend
> code by reducing the dependency to strerror().
> 
> One advantage of doing a switch, or at least reduce the use of
> strerror(), would be to ease the work of translators with more error
> messages unified between the frontend and the backend.  A possible
> drawback is that this could be a cause of minor conflicts when
> back-patching.  Always easy enough to fix, still that can be 
> annoying.
> 
> Thoughts?

It sounds good to me.  Message unification (including printf) needs
somehow treating trailing new lines, though.  About translation
burden, I'm not sure how the message unification eases translators'
work. Identical messages of different commands appear having different
neighbours in different po files.

By the way aren't we going to have ereport on frontend?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Proposal: Add more compile-time asserts to exposeinconsistencies.
Next
From: Guram Duka
Date:
Subject: [PATCH] Fix PostgreSQL 12.1 server build and install problems under MSYS2