Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyLXR-0003jd-HD for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2015 15:17:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZyLXQ-0002sD-TA for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2015 15:17:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZyLW7-0001OQ-Hl for pgsql-hackers@postgresql.org; Mon, 16 Nov 2015 15:16:27 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZyLW2-0004jN-FR for pgsql-hackers@postgresql.org; Mon, 16 Nov 2015 15:16:27 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 6B490400DFB; Mon, 16 Nov 2015 07:16:13 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 1B790C7F; Mon, 16 Nov 2015 12:16:07 -0300 (CLT) Date: Mon, 16 Nov 2015 12:16:07 -0300 From: Alvaro Herrera To: Kyotaro HORIGUCHI Cc: jeff.janes@gmail.com, thomas.munro@enterprisedb.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org Subject: Re: Making tab-complete.c easier to maintain Message-ID: <20151116151606.GW614468@alvherre.pgsql> References: <20151023175058.GA3391@alvherre.pgsql> <20151112.131627.11088278.horiguchi.kyotaro@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151112.131627.11088278.horiguchi.kyotaro@lab.ntt.co.jp> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) 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 Kyotaro HORIGUCHI wrote: > Auto-generating from grammer should be the ultimate solution but > I don't think it will be available. But still I found that the > word-splitting-then-match-word-by-word-for-each-matching is > terriblly unmaintainable and poorly capable. So, how about > regular expressions? I don't think this is an improvement. It seems to me that a lot more work is required to maintain these regular expressions, which while straightforward are not entirely trivial (harder to read). If we could come up with a reasonable format that is pre-processed to a regexp, that might be better. I think Thomas' proposed patch is closer to that than Horiguchi-san's. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers