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 1nF1J4-0008Su-HV for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 22:07:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nF1J3-0002zl-Ar for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 22:07:21 +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 1nF1J3-0002zc-1h for pgsql-hackers@lists.postgresql.org; Tue, 01 Feb 2022 22:07:21 +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 1nF1J0-0008AZ-Vq for pgsql-hackers@lists.postgresql.org; Tue, 01 Feb 2022 22:07:20 +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 211M6wWP964541; Tue, 1 Feb 2022 17:06:58 -0500 From: Tom Lane To: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= cc: "tanghy.fnst@fujitsu.com" , Peter Eisentraut , Japin Li , Kyotaro Horiguchi , Laurenz Albe , "smithpb2250@gmail.com" , "david.zhang@highgo.ca" , "pgsql-hackers@lists.postgresql.org" Subject: Re: Support tab completion for upper character inputs in psql In-reply-to: <87wniezq0u.fsf@wibble.ilmari.org> References: <80b093ae-88bd-8d8a-68b9-b535a3ab11be@enterprisedb.com> <54bd7839-f463-ef03-f2d2-ccb8184b9b27@enterprisedb.com> <1068530.1641480996@sss.pgh.pa.us> <3547066.1642272686@sss.pgh.pa.us> <2304294.1643152287@sss.pgh.pa.us> <2771362.1643385796@sss.pgh.pa.us> <2805502.1643405157@sss.pgh.pa.us> <2818574.1643408192@sss.pgh.pa.us> <324281.1643567679@sss.pgh.pa.us> <8735l41ynm.fsf@wibble.ilmari.org> <534641.1643594097@sss.pgh.pa.us> <838381.1643665141@sss.pgh.pa.us> <87wniezq0u.fsf@wibble.ilmari.org> Comments: In-reply-to =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= message dated "Tue, 01 Feb 2022 13:15:45 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <964539.1643753218.1@sss.pgh.pa.us> Date: Tue, 01 Feb 2022 17:06:58 -0500 Message-ID: <964540.1643753218@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > Tom Lane writes: >>> We could do something hacky like matching case only when there's >>> no longer any matching object names, but that might be too magic. >> I experimented with that, and it actually doesn't seem as weird >> as I feared. See if you like this ... > That's a reasonable compromise, and the implementation is indeed less > hacky than one might have feared. Although I think putting the > `num_keywords` variable before `num_other` would read better. Hm... I renamed "num_other" to "num_query_other" instead. > Going through the uses of COMPLETE_WITH(_SCHEMA)_QUERY_PLUS, I noticed a > few that had the keywords in lower case, which is fixed in the attached > patch (except the hardcoded data types, which aren't really keywords). Yeah, my oversight. Pushed. regards, tom lane