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 1lZnGH-0003mI-6H for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 04:17:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZnGG-0002VD-3L for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 04:17:48 +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 1lZnGF-0002V5-TF for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 04:17:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZnGD-0000uC-6F for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 04:17:47 +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 13N4HZV41282888; Fri, 23 Apr 2021 00:17:35 -0400 From: Tom Lane To: Kyotaro Horiguchi cc: tanghy.fnst@fujitsu.com, smithpb2250@gmail.com, peter.eisentraut@enterprisedb.com, david.zhang@highgo.ca, pgsql-hackers@lists.postgresql.org Subject: Re: Support tab completion for upper character inputs in psql In-reply-to: <20210423.123407.440405986257584017.horikyota.ntt@gmail.com> References: <20210423.115812.900808736988307020.horikyota.ntt@gmail.com> <1280270.1619147839@sss.pgh.pa.us> <20210423.123407.440405986257584017.horikyota.ntt@gmail.com> Comments: In-reply-to Kyotaro Horiguchi message dated "Fri, 23 Apr 2021 12:34:07 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1282886.1619151455.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 23 Apr 2021 00:17:35 -0400 Message-ID: <1282887.1619151455@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kyotaro Horiguchi writes: > At Thu, 22 Apr 2021 23:17:19 -0400, Tom Lane wrote in >> Doesn't seem like a good idea, because that locks us into an assumption >> that the downcasing conversion doesn't change the string's physical >> length. There are a lot of counterexamples to that :-(. I'm not sure > Mmm. I didn't know of that. The two examples I know of offhand are in German (eszett "ß" downcases to "ss") and Turkish (dotted "Í" downcases to "i", likewise dotless "I" downcases to "ı"; one of each of those pairs is an ASCII letter, the other is not). Depending on which encoding is in use, these transformations *could* be the same number of bytes, but they could equally well not be. There are probably other examples. regards, tom lane