Re: Mixed Locales and Upgrading

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Don Seiler <don(at)seiler(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Mixed Locales and Upgrading
Date: 2020-04-29 23:39:08
Message-ID: 9139.1588203548@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> On 4/29/20 1:10 PM, Don Seiler wrote:
>> On Tue, Apr 7, 2020 at 11:41 AM Don Seiler <don(at)seiler(dot)us
>> <mailto:don(at)seiler(dot)us>> wrote:
>> Since I'm not changing the postgres or template0 databases (leaving
>> those as en_US/LATIN1), do I keep lc_collate/lc_ctype as en_US? It's
>> just the template1 and application database that I've set to en_US.UTF-8.

I believe that those settings only affect locale-dependent processing
in the postmaster and/or background processes, which there should be
little or none of anyway. Processes connected to specific databases will
adopt the settings defined for those databases.

>> I'm also struggling to see how lc_messages is an empty string. It is
>> commented out in postgresql.conf but suggests 'C' will be the default.

> Are you sure?:
> Sets the language in which messages are displayed. Acceptable
> values are system-dependent; see Section 23.1 for more information. If
> this variable is set to the empty string (which is the default) then the
> value is inherited from the execution environment of the server in a
> system-dependent way. ..."

The "system-dependent way" is "adopt whatever the LANG/LC_foo environment
variables say at server startup", at least on non-Windows machines.
I think that C is the fallback if none of those variables are set, though.

Short answer is you shouldn't need to mess with these.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Stephens 2020-04-30 13:54:10 script libraries?
Previous Message Adrian Klaver 2020-04-29 22:10:30 Re: Mixed Locales and Upgrading