pgsql: Treat case of tab-completion keywords a bit more carefully.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Treat case of tab-completion keywords a bit more carefully.
Date: 2022-02-01 22:05:28
Message-ID: E1nF1HE-0006o8-RR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-02-02 00:03:59 pgsql: Replace use of deprecated Python module distutils.sysconfig, tak
Previous Message Tom Lane 2022-02-01 15:57:50 pgsql: Doc: modernize documentation for lo_create()/lo_creat().