Re: Support tab completion for upper character inputs in psql

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: tanghy.fnst@fujitsu.com
Cc: smithpb2250@gmail.com, peter.eisentraut@enterprisedb.com, david.zhang@highgo.ca, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Date: 2021-04-23T03:25:36Z
Lists: pgsql-hackers
At Fri, 23 Apr 2021 11:58:12 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> > Any further comment is very welcome.

Oh, I accidentally found a doubious behsbior.

=# alter table public.<tab>
public.c1    public.d1    public."t"   public.t     public."tt"  

The "t" and "tt" are needlessly lower-cased.

# \d
                     List of relations
 Schema |        Name        |       Type        |  Owner   
--------+--------------------+-------------------+----------
 public | T                  | partitioned table | horiguti
 public | TT                 | table             | horiguti
 public | c1                 | table             | horiguti
 public | d1                 | table             | horiguti
 public | t                  | partitioned table | horiguti

=# alter table public."<tab>
=# alter table public."t        -- candidates are "t" and "tt"?
=# alter table public."tt<tab>  -- nothing happenes
=# alter table public."TT<tab>  -- also nothing happenes

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Fix minor memory leaks in psql's tab completion.

  2. Further tweaks for psql's new tab-completion logic.

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

  4. psql: improve tab-complete's handling of variant SQL names.

  5. Make PQcancel use the PGconn's tcp_user_timeout and keepalives settings.

  6. Use a WaitLatch for vacuum/autovacuum sleeping