Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1li8PS-0001t6-Oj for pgsql-hackers@arkaria.postgresql.org; Sun, 16 May 2021 04:29:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1li8PQ-000713-HY for pgsql-hackers@arkaria.postgresql.org; Sun, 16 May 2021 04:29:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1li8PP-00070s-Gz for pgsql-hackers@lists.postgresql.org; Sun, 16 May 2021 04:29:43 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1li8PK-00043f-6B for pgsql-hackers@postgresql.org; Sun, 16 May 2021 04:29:41 +0000 Received: by mail-pj1-x1029.google.com with SMTP id t11so1999638pjm.0 for ; Sat, 15 May 2021 21:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=DmyVzmR5oI+p2ISwKJu8EuvXorm3uVVp0tEDCQ7sj8w=; b=PF7GCL3v4t+QrOhUuiGPcqYJLbJvFAbo3e9jTpDBJAQtsnKwJUSyah0ZUVLrS/w/x3 lcDxVZfkNc7N2fMaX50RfBREAetKFF41KsddiEYoHJHiFEnpzNu++ESJVx8SzNk240Aw DDYb2ZFOM2eWPdGH9UH5QnY6uxsvdtM5AU7Rw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=DmyVzmR5oI+p2ISwKJu8EuvXorm3uVVp0tEDCQ7sj8w=; b=Pw1fJR5E01aBr7lS+twSNCbjEoyupBYUH16zoVLNryrGD6HGZ6ByjE01IcQOOSKlYt OfC2s5LnW1CzWtmP8ze/7tsVVYqcaeCl4J/qXKNdnKoKe17fzZGIgiShxapCkLe7jmNM CkN+kt2DGq6VPJzTT1EffQGl3pmhewMT871DoA50Ita/oXLPISlHBtW1U0LYK7IJtBoZ W3dzT8sCXYqkmd0Bah0pdkB2Q0gfTuNUGme0H9qETHx6hDL28pgRfVkUERmxxj6pmYL1 OHFYFY/BMQ+AyFaO34+8HYOMXlBbKRQhIiNnb06PuNy7yfo9LTYWxw99BLhvxamib7RW 3Ddw== X-Gm-Message-State: AOAM531VzOr/J+qmLfco4KlGxkQA6ycwDcGua+XbmtovtABqOff/VtiZ jWBawNbIeC1OhD17NuPEaZzM3Q== X-Google-Smtp-Source: ABdhPJxRHbgSHeIf1VASSb5vxLPjoFWdAaIOcYWRTu5AHO8lx+eFvlWCqwgGvf1dO0IAre2lzsRKQg== X-Received: by 2002:a17:902:8205:b029:ee:aa49:489b with SMTP id x5-20020a1709028205b02900eeaa49489bmr54318562pln.5.1621139376300; Sat, 15 May 2021 21:29:36 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id y12sm5289207pfn.116.2021.05.15.21.29.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 May 2021 21:29:35 -0700 (PDT) Date: Sat, 15 May 2021 21:29:33 -0700 From: Noah Misch To: Thomas Munro Cc: pgsql-hackers Subject: Re: Windows default locale vs initdb Message-ID: <20210516042933.GC2913841@rfd.leadboat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Apr 19, 2021 at 05:42:51PM +1200, Thomas Munro wrote: > Currently initdb sets up template databases with old-style Windows > locale names reported by the OS, and they seem to have caused us quite > a few problems over the years: > > db29620d "Work around Windows locale name with non-ASCII character." > aa1d2fc5 "Another attempt at fixing Windows Norwegian locale." > db477b69 "Deal with yet another issue related to "Norwegian (Bokmål)"..." > 9f12a3b9 "Tolerate version lookup failure for old style Windows locale..." > I suppose that was the only form available at the time the code was > written, so there was no choice. Right. > The question we asked ourselves > multiple times in the other thread was how we're supposed to get to > the modern BCP 47 form when creating the template databases. It looks > like one possibility, since Vista, is to call > GetUserDefaultLocaleName()[2] > No patch, but I wondered if any Windows hackers have any feedback on > relative sanity of trying to fix all these problems this way. Sounds reasonable. If PostgreSQL v15 would otherwise run on Windows Server 2003 R2, this is a good time to let that support end.