Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a6jXW-0004wz-3a for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2015 18:32:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a6jXV-0005ZF-HQ for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2015 18:32:33 +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 1a6jWA-0002w3-Kh for pgsql-hackers@postgresql.org; Wed, 09 Dec 2015 18:31:10 +0000 Received: from 173-164-140-181-sfba.hfc.comcastbusiness.net ([173.164.140.181] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a6jW7-0008Ml-Vf for pgsql-hackers@postgresql.org; Wed, 09 Dec 2015 18:31:09 +0000 Received: by fetter.org (Postfix, from userid 500) id 4C644625B6; Wed, 9 Dec 2015 10:31:06 -0800 (PST) Date: Wed, 9 Dec 2015 10:31:06 -0800 From: David Fetter To: Greg Stark Cc: Michael Paquier , Thomas Munro , Alvaro Herrera , Jeff Janes , Tom Lane , Pg Hackers Subject: Re: Making tab-complete.c easier to maintain Message-ID: <20151209183106.GC10778@fetter.org> References: <20151116151923.GX614468@alvherre.pgsql> <20151209142709.GA7050@fetter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -0.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 On Wed, Dec 09, 2015 at 03:49:20PM +0000, Greg Stark wrote: > On Wed, Dec 9, 2015 at 2:27 PM, David Fetter wrote: > > Agreed that the "whole new language" aspect seems like way too big a > > hammer, given what it actually does. > > Which would be easier to update when things change? This question seems closer to being on point with the patch sets proposed here. > Which would be possible to automatically generate from gram.y? This seems like it goes to a wholesale context-aware reworking of tab completion rather than the myopic ("What has happened within the past N tokens?", for slowly increasing N) versions of tab completions in both the current code and in the two proposals here. A context-aware tab completion wouldn't care how many columns you were into a target list, or a FROM list, or whatever, as it would complete based on the (possibly nested) context ("in a target list", e.g.) rather than on inferences made from some slightly variable number of previous tokens. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers