Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDmM8-0037iX-2O for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Nov 2024 15:11:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tDmM6-006bSX-L4 for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Nov 2024 15:10:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDmM6-006bSO-CH for pgsql-bugs@lists.postgresql.org; Wed, 20 Nov 2024 15:10:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDmM3-002wRN-M1 for pgsql-bugs@lists.postgresql.org; Wed, 20 Nov 2024 15:10:57 +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 4AKFApJA149257; Wed, 20 Nov 2024 10:10:51 -0500 From: Tom Lane To: Bertrand Drouvot cc: Nathan Bossart , adam@labkey.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails In-reply-to: References: <18711-7503ee3e449d2c47@postgresql.org> <3072825.1731866414@sss.pgh.pa.us> <3796535.1732044807@sss.pgh.pa.us> <3976665.1732057784@sss.pgh.pa.us> Comments: In-reply-to Bertrand Drouvot message dated "Wed, 20 Nov 2024 08:17:11 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <149255.1732115451.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Nov 2024 10:10:51 -0500 Message-ID: <149256.1732115451@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bertrand Drouvot writes: > Could we rely on pg_encoding_max_length() instead of MAX_MULTIBYTE_CHAR_= LEN? That > would then work for short characters too IIUC. No. We don't know which encoding it is. Even if you wanted to say "use the database encoding", we haven't identified the database yet. regards, tom lane