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 1nVdGp-00048h-QG for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Mar 2022 17:53:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nVdGn-0003b4-SB for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Mar 2022 17:53:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVdGn-0003at-Iq for pgsql-hackers@lists.postgresql.org; Sat, 19 Mar 2022 17:53:41 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVdGg-0002CQ-W2 for pgsql-hackers@lists.postgresql.org; Sat, 19 Mar 2022 17:53:41 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1477:7740:df3c:d202:ca71:8aa5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4KLT573d77z3F14; Sat, 19 Mar 2022 18:53:31 +0100 (CET) Date: Sat, 19 Mar 2022 18:53:30 +0100 From: Christoph Berg To: Peter Eisentraut Cc: pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Add option to use ICU as global locale provider Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Peter Eisentraut > Since some (legacy) code still uses the libc locale facilities > directly, we still need to set the libc global locale settings even if > ICU is otherwise selected. So pg_database now has three > locale-related fields: the existing datcollate and datctype, which are > always set, and a new daticulocale, which is only set if ICU is > selected. A similar change is made in pg_collation for consistency, > but in that case, only the libc-related fields or the ICU-related > field is set, never both. Since the intended usage seems to be that databases should either be using libc, or the ICU locales, but probably not both at the same time, does it make sense to clutter the already very wide `psql -l` output with two new extra columns? This hardly fits in normal-size terminals: =# \l List of databases Name │ Owner │ Encoding │ Collate │ Ctype │ ICU Locale │ Locale Provider │ Access privileges ───────────┼───────┼──────────┼────────────┼────────────┼────────────┼─────────────────┼─────────────────── postgres │ myon │ UTF8 │ de_DE.utf8 │ de_DE.utf8 │ │ libc │ template0 │ myon │ UTF8 │ de_DE.utf8 │ de_DE.utf8 │ │ libc │ =c/myon ↵ │ │ │ │ │ │ │ myon=CTc/myon template1 │ myon │ UTF8 │ de_DE.utf8 │ de_DE.utf8 │ │ libc │ =c/myon ↵ │ │ │ │ │ │ │ myon=CTc/myon (3 rows) (Even longer if the username is "postgres") It also makes \l+ even harder to read when the most often only relevant new column, the database size, is even more to the far right. Couldn't that be a single "Locale" column, possibly extended by more info in parentheses if the values differ? Locale de_DE.utf8 de-x-icu-whatever de_DE.utf8 (Ctype: C.UTF-8) SQL_ASCII (ICU Locale: en-x-something) Christoph