Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql@j-davis.com, ranier.vf@gmail.com, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Date: 2023-09-13T02:48:59Z
Lists: pgsql-hackers
Attachments
- pglocale-elogs-v5.patch (text/x-diff) patch v5
On Wed, Sep 13, 2023 at 09:59:22AM +0900, Kyotaro Horiguchi wrote: > At Tue, 12 Sep 2023 09:03:27 +0900, Michael Paquier <michael@paquier.xyz> wrote in > > On Mon, Sep 11, 2023 at 12:15:49PM -0700, Jeff Davis wrote: > > > That's fine with me. > > > > Okay. Then, please find attached a v4 for HEAD and REL_16_STABLE. > > For example, they result in the following message: > > ERROR: unsupported collprovider (pg_strcoll): i > > Even if it is an elog message, I believe we can make it clearer. The > pg_strcoll seems like a collation privier at first glance. Not sure > about others, though, I would spell it as the follows instead: > > ERROR: unsupported collprovider in pg_strcoll: i > ERROR: unsupported collprovider in pg_strcoll(): i Hmm. I see your point, one could be confused that the function name is the provider with this wording. How about that instead: ERROR: unsupported collprovider for %s: %c I've hidden that in a macro that uses __func__ as Jeff has suggested. What do you think? -- Michael
Commits
-
Refactor error messages for unsupported providers in pg_locale.c
- 800d5bcb982b 16.1 landed
- b8f44a477945 17.0 landed