From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Test PRI* macros even when we can't test NLS translation.
Date: Tue, 16 Dec 2025 17:01:54 +0000
Message-ID: <E1vVYQr-00161h-2c@gemulon.postgresql.org> (raw)
Test PRI* macros even when we can't test NLS translation.
Further research shows that the reason commit 7db6809ce failed
is that recent glibc versions short-circuit translation attempts
when LC_MESSAGES is 'C.<encoding>', not only when it's 'C'.
There seems no way around that, so we'll have to live with only
testing NLS when a suitable real locale is installed.
However, something can still be salvaged: it still seems like a
good idea to verify that the PRI* macros work as-expected even when
we can't check their translations (see f8715ec86 for motivation).
Hence, adjust the test to always run the ereport calls, and tweak
the parameter values in hopes of detecting any cases where there's
confusion about the actual widths of the parameters.
Discussion: https://postgr.es/m/1991599.1765818338@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/462e2476525e71aa028c4a079bd77d2cac8a36b7
Modified Files
--------------
src/test/regress/expected/nls.out | 21 ++++++++-------------
src/test/regress/expected/nls_1.out | 21 ++++++++++++++++-----
src/test/regress/expected/nls_2.out | 29 ++++++++++++++++++++++++-----
src/test/regress/regress.c | 34 +++++++++++++++++++++++-----------
src/test/regress/sql/nls.sql | 6 ------
5 files changed, 71 insertions(+), 40 deletions(-)
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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Test PRI* macros even when we can't test NLS translation.
In-Reply-To: <E1vVYQr-00161h-2c@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