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 1lLthc-0008E5-DZ for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Mar 2021 20:20:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lLtha-0003dB-TA for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Mar 2021 20:20:34 +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 1lLtha-0003d3-MH for pgsql-hackers@lists.postgresql.org; Mon, 15 Mar 2021 20:20:34 +0000 Received: from wforward4-smtp.messagingengine.com ([64.147.123.34]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lLthW-0001Zf-3G for pgsql-hackers@lists.postgresql.org; Mon, 15 Mar 2021 20:20:34 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailforward.west.internal (Postfix) with ESMTP id 255122804; Mon, 15 Mar 2021 16:20:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 15 Mar 2021 16:20:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Op5a3MlugoiJTMK6f8KHotyW2YSrlLnB9A/HA6i3S Ss=; b=EdrQk3eUvmVqOsi1Eu8nF0UbYfWa50w3KMCK+WABM8dGiIAqtvTIeha7y VQ4cUnr710THVbu3BZEYbK/7WAcWf+VGG0FOR2kyCptWMVKNsjyyh1jgxpycTZfW Doi+Jsw3ukooQQEsinnkO7NBYulyx9uOLquglcCeAaY2SQa39ma23xlF6XxtPwsd SPJ9N4qUXQEACM/GL/DOcbkXA++5vpTk/CLWPpVpgDiriOJU5ryUk4HtL1sOQA/d nq33GLZO2SahPu8YaOVxSQTMwajUtdFVtS60ikuCE1zFa0fr88EhgXjShhxH94TX aeSmrg9D6XRDxrpnmKvwBWrS8I+JA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvledgudefkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ejredttdefgfenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgv rhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomheqnecuggftrf grthhtvghrnhepjeefhfegfffgvdeugedvueeiveetudeuieeiheehfeekvefhfffhveeg ueeikeetnecukfhppeekjedrudejjedrieelrddugedtnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: from laptop206oxuk.local (p57b1458c.dip0.t-ipconnect.de [87.177.69.140]) by mail.messagingengine.com (Postfix) with ESMTPA id 5403A108005C; Mon, 15 Mar 2021 16:20:24 -0400 (EDT) Subject: Re: Support tab completion for upper character inputs in psql To: "Tang, Haiying" , Kyotaro Horiguchi , Tom Lane Cc: "pgsql-hackers@lists.postgresql.org" References: <457958.1612724100@sss.pgh.pa.us> <20210208.170212.1547983279045749071.horikyota.ntt@gmail.com> <696766648c7a4266864f843b0e4140dd@G08CNEXMBPEKD05.g08.fujitsu.local> <5f225addccc54478a6436b78423f21be@G08CNEXMBPEKD05.g08.fujitsu.local> From: Peter Eisentraut Message-ID: <24171b05-cf0f-3073-a73a-57b45b794049@enterprisedb.com> Date: Mon, 15 Mar 2021 21:20:22 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <5f225addccc54478a6436b78423f21be@G08CNEXMBPEKD05.g08.fujitsu.local> Content-Type: text/plain; charset=iso-2022-jp; format=flowed; delsp=yes Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 09.02.21 15:48, Tang, Haiying wrote: > I'm still confused about the APPROPRIATE behavior of tab completion. > It seems ALTER table/tablespace SET/RESET is already case-insensitive. > > For example > # alter tablespace dbspace set(e[tab] > # alter tablespace dbspace set(effective_io_concurrency > > # alter tablespace dbspace set(E[tab] > # alter tablespace dbspace set(EFFECTIVE_IO_CONCURRENCY This case completes with a hardcoded list, which is done case-insensitively by default. The cases that complete with a query result are not case insensitive right now. This affects things like UPDATE T as well. I think your first patch was basically right. But we need to understand that this affects all completions with query results, not just the one you wanted to fix. So you should analyze all the callers and explain why the proposed change is appropriate.