pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Greg Stark <stark@mit.edu>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Making tab-complete.c easier to maintain
Date: Wed, 9 Dec 2015 10:31:06 -0800
Message-ID: <20151209183106.GC10778@fetter.org> (raw)
In-Reply-To: <CAM-w4HO_1Qw-Ph8E75hp7A7mNyKnhnNMvmhK2Pv2SqJGoebNxQ@mail.gmail.com>
References: <CAEepm=1ns0rbo+xun_j6_PwDT6zmEPuNggy=Vaie-3peF2C44Q@mail.gmail.com>
	<CAMkU=1zRsaaSF_8qyQNYqOcDt0Xa7Awk==YdWCeTZtNhjnPNww@mail.gmail.com>
	<CAEepm=1Oaq+L_6KCZ5o_hNn-=T93_LiK=_T1C9DcPzgXs4H84g@mail.gmail.com>
	<CAEepm=1EOiP9_fKfb2B_ncp2hWYFxWEM+OsoD-=-iL_Wh=46Vg@mail.gmail.com>
	<20151116151923.GX614468@alvherre.pgsql>
	<CAB7nPqTfXV5Jwd1j-JF4wTuVgt8ggsNAy=yBByWB0nV1_3CEsA@mail.gmail.com>
	<CAEepm=0+vDukbD7St2tjvpF9Ro9Z5Gj1Q9Mh6hKg+Of2YMNxzQ@mail.gmail.com>
	<CAB7nPqRoQVqzz9y5hOYBhMwPy5_OoTrObf=5a1XP+zjkPNAAkg@mail.gmail.com>
	<20151209142709.GA7050@fetter.org>
	<CAM-w4HO_1Qw-Ph8E75hp7A7mNyKnhnNMvmhK2Pv2SqJGoebNxQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Wed, Dec 09, 2015 at 03:49:20PM +0000, Greg Stark wrote:
> On Wed, Dec 9, 2015 at 2:27 PM, David Fetter <david@fetter.org> 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 <david@fetter.org> 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



view thread (86+ messages)  latest in thread

Message-ID: <20151209183106.GC10778@fetter.org>
Permalink:  ../20151209183106.GC10778@fetter.org/
Also on:    postgresql.org/message-id/20151209183106.GC10778@fetter.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: david@fetter.org, stark@mit.edu, michael.paquier@gmail.com, thomas.munro@enterprisedb.com, alvherre@2ndquadrant.com, jeff.janes@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Making tab-complete.c easier to maintain
  In-Reply-To: <20151209183106.GC10778@fetter.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox