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 1lHpvc-00061s-Ap for pgsql-admin@arkaria.postgresql.org; Thu, 04 Mar 2021 15:30:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHpvb-0001CR-AG for pgsql-admin@arkaria.postgresql.org; Thu, 04 Mar 2021 15:30:15 +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 1lHpv0-0006NY-Q1 for pgsql-admin@lists.postgresql.org; Thu, 04 Mar 2021 15:29:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHpuy-00054n-Q4 for pgsql-admin@lists.postgresql.org; Thu, 04 Mar 2021 15:29:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 124FTXv41360326; Thu, 4 Mar 2021 10:29:33 -0500 From: Tom Lane To: mail@localhorst.es cc: pgsql-admin@lists.postgresql.org Subject: Re: Different encodings and locales on one machine In-reply-to: References: Comments: In-reply-to mail@localhorst.es message dated "Thu, 04 Mar 2021 09:40:26 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1360324.1614871773.1@sss.pgh.pa.us> Date: Thu, 04 Mar 2021 10:29:33 -0500 Message-ID: <1360325.1614871773@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk mail@localhorst.es writes: > at the moment I am running two different PostgreSQL (12) servers on one > Ubuntu 20.04 machine. > For server one I need WIN1252 encoding with "de_DE.cp1252" locales set. > For server two I need UTF8 encoding, but also with "de_DE.cp1252" > locales set. This statement is nonsensical. The second component of the locale name is precisely the encoding that the locale is meant to be used with. There is no such thing as "de_DE.cp1252" locale that works with UTF8 data --- you'd have to use "de_DE.utf8" instead. You haven't explained exactly why you think you have that requirement, but I wonder whether you aren't confusing client and server encoding. There's no problem in having a client that is using WIN1252 encoding while the server uses UTF8 --- just make sure that the client_encoding parameter is set correctly for that client. regards, tom lane