pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: clean up obsolete initdb locale handling
Date: Thu, 08 Aug 2019 11:51:45 -0400
Message-ID: <30434.1565279505@sss.pgh.pa.us> (raw)
In-Reply-To: <27394.1565276193@sss.pgh.pa.us>
References: <eeaf2f99-a1a6-8aca-3f43-9ab0b2fb112a@2ndquadrant.com>
	<27394.1565276193@sss.pgh.pa.us>

I wrote:
> ... In particular, I'm concerned that this patch will
> result in subtle changes in what settings get chosen during initdb.

OK, after reviewing the code a bit more I take that back --- initdb's
choices are entirely made within initdb.

However, I don't much like the choice to set LC_COLLATE and LC_CTYPE
differently.  That seems to be risking weird behavior, and for what?
I'd be inclined to just remove the WIN32 stanza, initialize all
three of these variables with "", and explain it along the lines of

    * In the postmaster, absorb the environment values for LC_COLLATE
    * and LC_CTYPE.  Individual backends will change these later to
    * settings taken from pg_database, but the postmaster cannot do
    * that.  If we leave these set to "C" then message localization
    * might not work well in the postmaster.

That ends up being no code change in main.c, except on Windows.
I concur that we can drop the transmission of LC_COLLATE and
LC_CTYPE via environment variables.

			regards, tom lane





view thread (6+ messages)  latest in thread

Message-ID: <30434.1565279505@sss.pgh.pa.us>
Permalink:  ../30434.1565279505@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30434.1565279505@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
  Subject: Re: clean up obsolete initdb locale handling
  In-Reply-To: <30434.1565279505@sss.pgh.pa.us>

* 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