From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Making tab-complete.c easier to maintain |
Date: | 2015-10-22 21:49:28 |
Message-ID: | 20151022214928.GS3391@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2015-10-22 21:51:04 | Re: Change behavior of (m)xid_age |
Previous Message | Magnus Hagander | 2015-10-22 21:42:48 | Re: Avoid full page images in streaming replication? |