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 1lZmJu-0001aW-1Q for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 03:17:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZmJt-0007tU-16 for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 03:17:29 +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 1lZmJs-0007tN-Qv for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 03:17:28 +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 1lZmJq-0002AX-Nh for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 03:17:27 +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 13N3HJfV1280271; Thu, 22 Apr 2021 23:17:19 -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.115812.900808736988307020.horikyota.ntt@gmail.com> References: <20210423.115812.900808736988307020.horikyota.ntt@gmail.com> Comments: In-reply-to Kyotaro Horiguchi message dated "Fri, 23 Apr 2021 11:58:12 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1280269.1619147839.1@sss.pgh.pa.us> Date: Thu, 22 Apr 2021 23:17:19 -0400 Message-ID: <1280270.1619147839@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kyotaro Horiguchi writes: > All usages of pg_string_tolower don't need a copy. > So don't we change the function to in-place converter? 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 that we actually implement such cases correctly today, but let's not build APIs that prevent it from being fixed. regards, tom lane