Re: Let's add a test for NLS translation of PRI* macros

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Let's add a test for NLS translation of PRI* macros
Date: 2025-12-09 17:08:28
Message-ID: 247596.1765300108@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> v4-0001 attached tries to deal with #1 by extracting a codeset
> name from pg_database.datctype. That seems to work for me locally,
> but I'll be interested to see what cfbot thinks.

cfbot didn't like that :-(. Upon further review, it seems that
the locale name needs to include a valid encoding spec, but that
encoding spec doesn't actually have to match the database encoding
(checked here on Linux, macOS, all three major BSDen). Perhaps
there would be some issues with character set conversion if not,
but the test case I'm proposing is intentionally chosen to not
involve any non-ASCII characters, so it shouldn't matter.

Hence, new version attached that just hard-codes es_ES.UTF-8.
We'll see if cfbot agrees with my local testing.

(I went ahead and pushed 0002, since that seemed pretty
uncontroversial as well as fixing a demonstrated bug.)

regards, tom lane

Attachment Content-Type Size
v6-0001-Add-a-regression-test-to-verify-that-NLS-translat.patch text/x-diff 13.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2025-12-09 17:46:59 Re: Skipping schema changes in publication
Previous Message Nathan Bossart 2025-12-09 17:02:56 Re: [PATCH] Fix inconsistent title attribute tags in documentation