Re: Support tab completion for upper character inputs in psql
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: "Tang, Haiying" <tanghy.fnst@cn.fujitsu.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-15T20:20:22Z
Lists: pgsql-hackers
On 09.02.21 15:48, Tang, Haiying wrote: > I'm still confused about the APPROPRIATE behavior of tab completion. > It seems ALTER table/tablespace <name> SET/RESET is already case-insensitive. > > For example > # alter tablespace dbspace set(e[tab] > # alter tablespace dbspace set(effective_io_concurrency > > # alter tablespace dbspace set(E[tab] > # alter tablespace dbspace set(EFFECTIVE_IO_CONCURRENCY This case completes with a hardcoded list, which is done case-insensitively by default. The cases that complete with a query result are not case insensitive right now. This affects things like UPDATE T<tab> as well. I think your first patch was basically right. But we need to understand that this affects all completions with query results, not just the one you wanted to fix. So you should analyze all the callers and explain why the proposed change is appropriate.
Commits
-
Fix minor memory leaks in psql's tab completion.
- 90474c16a7d2 16.0 landed
- 00cf40328a31 15.0 landed
-
Further tweaks for psql's new tab-completion logic.
- f0cd9097cfac 15.0 landed
-
Treat case of tab-completion keywords a bit more carefully.
- 020258fbd30d 15.0 landed
-
psql: improve tab-complete's handling of variant SQL names.
- 02b8048ba5dc 15.0 landed
-
Make PQcancel use the PGconn's tcp_user_timeout and keepalives settings.
- 5987feb70b5b 15.0 cited
-
Use a WaitLatch for vacuum/autovacuum sleeping
- 4753ef37e0ed 14.0 cited