Re: Increase footprint of %m and reduce strerror()

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: michael(at)paquier(dot)xyz
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Increase footprint of %m and reduce strerror()
Date: 2019-12-04 06:32:11
Message-ID: 20191204.153211.254366568833808068.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 29 Nov 2019 15:51:15 +0900, Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Guram Duka 2019-12-04 07:46:39 [PATCH] Fix PostgreSQL 12.1 server build and install problems under MSYS2
Previous Message Michael Paquier 2019-12-04 06:16:25 Re: Proposal: Add more compile-time asserts to expose inconsistencies.