pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor error messages for unsupported providers in pg_locale.c
Date: Wed, 13 Sep 2023 23:35:50 +0000
Message-ID: <E1qgZOg-003h9z-Jv@gemulon.postgresql.org> (raw)

Refactor error messages for unsupported providers in pg_locale.c

These code paths should not be reached normally, but if they are an
error with "(null)" as information for the collation provider would show
up if no locale is set, while we can assume that we are referring to
libc.

This refactors the code so as the provider is always reported even if no
locale is set.  The name of the function where the error happens is
added, while on it, as it can be helpful for debugging.

Issue introduced by d87d548cd030, so backpatch down to 16.

Author: Michael Paquier, Ranier Vilela
Reviewed-by: Jeff Davis, Kyotaro Horiguchi
Discussion: https://postgr.es/m/7073610042fcf97e1bea2ce08b7e0214b5e11094.camel@j-davis.com
Backpatch-through: 16

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b8f44a47794588329cec280ee16eb0be17e1816e

Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1qgZOg-003h9z-Jv@gemulon.postgresql.org>
Permalink:  ../E1qgZOg-003h9z-Jv@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qgZOg-003h9z-Jv@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Refactor error messages for unsupported providers in pg_locale.c
  In-Reply-To: <E1qgZOg-003h9z-Jv@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox