pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Making tab-complete.c easier to maintain
Date: Thu, 22 Oct 2015 18:49:28 -0300
Message-ID: <20151022214928.GS3391@alvherre.pgsql> (raw )
In-Reply-To: <51382.1445549813@sss.pgh.pa.us >
References: <17081.1441374043@sss.pgh.pa.us >
<CAEepm=0QKjnVVq9ueBXP5yntNFwtFZhFzLPEOpCA-PPoh0NieQ@mail.gmail.com >
<20150907135605.GP2912@alvherre.pgsql >
<CAEepm=3q9oBsd65F3AMTKw9-Rs+E+SDV3HpGV5yLj7ySetj7Yw@mail.gmail.com >
<CAEepm=1=Hdt9TCM3BRiVE6NCnXHyDDki+YVPhfZ02_=niU=8cA@mail.gmail.com >
<CAMkU=1yt=Ed7+K4sUisdUkt-wDhGnxdkDqs_43uJvhJYFA56gQ@mail.gmail.com >
<CAEepm=1ns0rbo+xun_j6_PwDT6zmEPuNggy=Vaie-3peF2C44Q@mail.gmail.com >
<CAEepm=2X08QRoJD3Bu4em-w=c=Q7SCCHM404jK-ercR4H1xtkw@mail.gmail.com >
<CA+TgmoYow9qMFJ8hJipmd7K9=_xeUtAVVarQJGY401_nTnopeQ@mail.gmail.com >
<51382.1445549813@sss.pgh.pa.us >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Tom Lane wrote:
> What I would like is to find a way to auto-generate basically this entire
> file from gram.y. That would imply going over to something at least
> somewhat parser-based, instead of the current way that is more or less
> totally ad-hoc. That would be a very good thing though, because the
> current way gives wrong answers not-infrequently, even discounting cases
> that it's simply not been taught about.
I did discuss exactly this topic with Thomas a month ago or so in
private email, and our conclusion was that it would be a really neat
project but a lot more effort than this patch. And after skimming over
the patch back then, I think this is well worth the reduced maintenance
effort.
> I have no very good idea how to do that, though. Bison does have a
> notion of which symbols are possible as the next symbol at any given
> parse point, but it doesn't really make that accessible. There's a lack
> of cooperation on the readline side too: we'd need to be able to see the
> whole query buffer not just the current line.
At the current pace, a project like this might take years to
turn into a real patch. My own vote is for applying this for the time
being.
--
Á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
view thread (86+ messages) latest in thread
Message-ID: <20151022214928.GS3391@alvherre.pgsql>
Permalink: ../20151022214928.GS3391@alvherre.pgsql/
Also on: postgresql.org/message-id/20151022214928.GS3391@alvherre.pgsql
copy link · copy postgr.es
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: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, thomas.munro@enterprisedb.com, jeff.janes@gmail.com
Subject: Re: Making tab-complete.c easier to maintain
In-Reply-To: <20151022214928.GS3391@alvherre.pgsql>
* 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