Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aDx29-000298-JY for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Dec 2015 16:22:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aDx28-0002sN-KB for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Dec 2015 16:22:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aDx26-0002rQ-S0 for pgsql-hackers@postgresql.org; Tue, 29 Dec 2015 16:21:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aDx24-0000wt-D2 for pgsql-hackers@postgresql.org; Tue, 29 Dec 2015 16:21:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id tBTGLnPv001012; Tue, 29 Dec 2015 11:21:49 -0500 From: Tom Lane To: Michael Paquier cc: Thomas Munro , Kyotaro HORIGUCHI , Alvaro Herrera , Jeff Janes , PostgreSQL mailing lists Subject: Re: Making tab-complete.c easier to maintain In-reply-to: References: <20151217.150633.216859242.horiguchi.kyotaro@lab.ntt.co.jp> <1851.1450471370@sss.pgh.pa.us> <21460.1450560248@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Tue, 29 Dec 2015 23:14:16 +0900" Date: Tue, 29 Dec 2015 11:21:49 -0500 Message-ID: <1011.1451406109@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Michael Paquier writes: >> On Sun, Dec 20, 2015 at 6:24 AM, Tom Lane wrote: >>> 1. I think it would be a good idea to convert the matching rules for >>> backslash commands too. To do that, we'd need to provide a case-sensitive >>> equivalent to word_match and the matching macros. I think we'd also have >>> to extend word_match to allow a trailing wildcard character, maybe "*". > I am not really sure I follow much the use of the wildcard, do you > mean to be able to work with the [S] extensions of the backslash > commands which are not completed now? But they are completed: regression=# \dfS str string_agg string_agg_transfn strip string_agg_finalfn string_to_array strpos This is because of the use of strncmp instead of plain strcmp in most of the backslash matching rules, eg the above case is covered by else if (strncmp(prev_wd, "\\df", strlen("\\df")) == 0) I was envisioning that we'd want to convert this to something like else if (TailMatchesCS1("\\df*")) regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers