From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Kirk Wolak <wolakk@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Date: Wed, 23 Nov 2022 20:28:29 -0500
Message-ID: <3769352.1669253309@sss.pgh.pa.us> (raw)
In-Reply-To: <20221124004144.iosgze2qnmcctgsh@awork3.anarazel.de>
References: <CACLU5mThm-uCtERMVHMoGED2EPfyS54j83WB20s_BmzVQuMkpg@mail.gmail.com>
<3168699.1669046286@sss.pgh.pa.us>
<20221123230256.m23somxrmvdyoimk@awork3.anarazel.de>
<3755435.1669245082@sss.pgh.pa.us>
<20221124004144.iosgze2qnmcctgsh@awork3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2022-11-23 18:11:22 -0500, Tom Lane wrote:
>> Huh ... do you recall the details? Large as tab-complete is, it's
>> far smaller than gram.y:
> So It might just be that we need to split up that very long "else if" chain in
> psql_completion().
Could be, yeah. Related point: I've wondered for awhile how long that
chain can get before we start noticing performance issues on slower
machines. Even when the standard is just human reaction time, there's
a limit to how many cycles you can throw away. So I'd like to see it
refactored somehow to be a bit less stupid --- but I have a nagging
feeling that we'd end up building some special-purpose program generator,
which is something I've not wanted to do. OTOH, in the best of all
possible worlds such a tool might make it easier to add tab
completions?
(In the past I've fantasized about auto-generating tab completion
logic from the backend grammar, but I fear it's just fantasy.
The backend grammar isn't factored right, and too many of its names
don't have clear traceability to what-kind-of-object-is-that.)
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, thomas.munro@gmail.com, wolakk@gmail.com, pgsql-general@lists.postgresql.org
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
In-Reply-To: <3769352.1669253309@sss.pgh.pa.us>
* 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