Re: Support tab completion for upper character inputs in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "smithpb2250(at)gmail(dot)com" <smithpb2250(at)gmail(dot)com>, "david(dot)zhang(at)highgo(dot)ca" <david(dot)zhang(at)highgo(dot)ca>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support tab completion for upper character inputs in psql
Date: 2022-02-01 22:06:58
Message-ID: 964540.1643753218@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari(at)ilmari(dot)org> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>>> We could do something hacky like matching case only when there's
>>> no longer any matching object names, but that might be too magic.
>> I experimented with that, and it actually doesn't seem as weird
>> as I feared. See if you like this ...

> That's a reasonable compromise, and the implementation is indeed less
> hacky than one might have feared. Although I think putting the
> `num_keywords` variable before `num_other` would read better.

Hm... I renamed "num_other" to "num_query_other" instead.

> Going through the uses of COMPLETE_WITH(_SCHEMA)_QUERY_PLUS, I noticed a
> few that had the keywords in lower case, which is fixed in the attached
> patch (except the hardcoded data types, which aren't really keywords).

Yeah, my oversight. Pushed.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-02-01 22:24:19 Re: Windows crash / abort handling
Previous Message Andres Freund 2022-02-01 21:52:09 Re: Support for NSS as a libpq TLS backend