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 1tDn2f-003CZj-SN for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Nov 2024 15:54:57 +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 1tDn2e-006xxp-74 for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Nov 2024 15:54:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDn2d-006xxh-UI for pgsql-bugs@lists.postgresql.org; Wed, 20 Nov 2024 15:54:55 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDn2b-002tt5-EP for pgsql-bugs@lists.postgresql.org; Wed, 20 Nov 2024 15:54:54 +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 4AKFso5O154105; Wed, 20 Nov 2024 10:54:50 -0500 From: Tom Lane To: Nathan Bossart cc: adam@labkey.com, Bertrand Drouvot , 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> <75265.1732076593@sss.pgh.pa.us> Comments: In-reply-to Nathan Bossart message dated "Wed, 20 Nov 2024 09:35:33 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <154103.1732118090.1@sss.pgh.pa.us> Date: Wed, 20 Nov 2024 10:54:50 -0500 Message-ID: <154104.1732118090@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > That's good to know. If we can assume that 1) all bytes of a multibyte > character have the high bit set and 2) all multibyte characters actually > require multiple bytes, then there are just a handful of cases that require > multiple lookups, and we can restrict even those to some extent, too. I'm failing to parse your (2). Either that's content-free or you're thinking something that probably isn't true. There are encodings (mostly the LATINn series) that have high-bit-set characters that only occupy one byte. So I don't think we can take any shortcuts compared to the strip-one-byte-at-a-time approach. regards, tom lane