From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Further tweaks for psql's new tab-completion logic. |
Date: | 2022-02-09 22:06:36 |
Message-ID: | E1nHv6i-0007gk-7M@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Further tweaks for psql's new tab-completion logic.
The behavior I proposed, of matching case only when only keywords
are available to complete, turns out to be too cute. It adds about
as many problems as it removes. Simplify down to ilmari's original
proposal of just always matching case when completing a keyword.
Also, I noticed while testing this that we've pessimized the behavior
for qualified GUC names: the code is insisting that they be
double-quoted, which was not the case before. Fix that by treating
GUC names as verbatim matches instead of possibly-schema-qualified
names. (While it's tempting to try to split qualified GUC names
so that we *could* treat them with the schema-qualified-name code
path, that really isn't going to work in light of guc.c's willingness
to allow more than two name components.)
Dagfinn Ilmari Mannsåker and Tom Lane
Discussion: https://postgr.es/m/445692.1644018081@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f0cd9097cfac435ec18ab2595c81f13a14736758
Modified Files
--------------
src/bin/psql/t/010_tab_completion.pl | 24 ++++++++++----
src/bin/psql/tab-complete.c | 63 ++++++++++++++++++++++--------------
2 files changed, 56 insertions(+), 31 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-02-10 01:27:46 | pgsql: Reduce more the number of calls to GetMaxBackends() |
Previous Message | Tom Lane | 2022-02-09 19:25:08 | pgsql: Test honestly for <sys/signalfd.h>. |