From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Treat case of tab-completion keywords a bit more carefully.
Date: Tue, 01 Feb 2022 22:05:28 +0000
Message-ID: <E1nF1HE-0006o8-RR@gemulon.postgresql.org> (raw)
Treat case of tab-completion keywords a bit more carefully.
When completing keywords that are offered alongside names obtained
from a query, preserve the user's choice of keyword case. This
would have been messy to do before 02b8048ba, but now it's fairly
simple. A complication is that we want keywords to be shown in
upper case in any tab-completion menus that include both keywords
and non-keywords, so we can't switch their case until enough has
been typed that only keyword(s) remain to be chosen.
Also, adjust some places where 02b8048ba thoughtlessly held over
a previous choice to display keywords in lower case. (I think
I got confused as to whether those words were keywords or variable
names, but they're the former.)
Dagfinn Ilmari Mannsåker and Tom Lane
Discussion: https://postgr.es/m/8735l41ynm.fsf@wibble.ilmari.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/020258fbd30d37ddd03d0ec68264d1544f8d2838
Modified Files
--------------
src/bin/psql/t/010_tab_completion.pl | 34 +++++++++++++++------
src/bin/psql/tab-complete.c | 57 +++++++++++++++++++++++-------------
2 files changed, 62 insertions(+), 29 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Treat case of tab-completion keywords a bit more carefully.
In-Reply-To: <E1nF1HE-0006o8-RR@gemulon.postgresql.org>
References: <E1nF1HE-0006o8-RR@gemulon.postgresql.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