Re: Support tab completion for upper character inputs in psql
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>,
David Zhang <david.zhang@highgo.ca>,
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-04-08T07:13:44Z
Lists: pgsql-hackers
On 01.04.21 11:40, tanghy.fnst@fujitsu.com wrote: > On Wednesday, March 31, 2021 4:05 AM, David Zhang <david.zhang@highgo.ca> wrote > >> 8 postgres=# update tbl SET DATA = >> 9 >> 10 postgres=# update TBL SET >> 11 >> 12 postgres=# >> >> So, as you can see the difference is between line 8 and 10 in case 2. It >> looks like the lowercase can auto complete more than the uppercase; >> secondly, if you can add some test cases, it would be great. > > Thanks for your test. I fix the bug and add some tests for it. > Please find attached the latest patch V4. > > Differences from v3 are: > * fix an issue reported by Zhang [1] where a scenario was found which still wasn't able to realize tap completion in query. > * add some tap tests. Seeing the tests you provided, it's pretty obvious that the current behavior is insufficient. I think we could probably think of a few more tests, for example exercising the "If case insensitive matching was requested initially, adjust the case according to setting." case, or something with quoted identifiers. I'll push this to the next commit fest for now. I encourage you to keep working on it.
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