BUG #18136: lc_messages is the empty string but should be 'C'? - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18136: lc_messages is the empty string but should be 'C'?
Date
Msg-id 18136-4914128da6cfc502@postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18136
Logged by:          Gavin Panella
Email address:      gavinpanella@gmail.com
PostgreSQL version: 16.0
Operating system:   macOS
Description:

Given a server:

```
initdb -D foo --locale=C
pg_ctl start -D foo -l logfile -w -o "-h '' -k $PWD/foo"
```

In PostgreSQL 16.0 the value of lc_messages is the empty string.

But in PostgreSQL from 9.x through to 15.x the value of lc_messages is
'C'.

I have tried using `initdb ... --lc-messages=C` and `LC_MESSAGES=C pg_ctl
start ...` and `LC_MESSAGES=C psql ...` with the same result.

However, if I run initdb with a locale other than C, e.g. POSIX or fr_FR,
then the value of lc_messages *does* reflect my choice.

Using --lc-messages with initdb also sets lc_messages as expected.

(This is something I observed from some test suites I run, and I dug into it
to see if there was a problem. Other than needing me to update those tests,
it is not affecting me at present.)


pgsql-bugs by date:

Previous
From: Japin Li
Date:
Subject: Re: Bug of psql meta-command \sf & \sv
Next
From: Kyle MacMillan
Date:
Subject: Re: md5 password valid and invalid after upgrading