RE: Support tab completion for upper character inputs in psql
Tang, Haiying <tanghy.fnst@cn.fujitsu.com>
From: "Tang, Haiying" <tanghy.fnst@cn.fujitsu.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, "tgl@sss.pgh.pa.us" <tgl@sss.pgh.pa.us>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-08T12:12:35Z
Lists: pgsql-hackers
Attachments
- V2-0001-Support-tab-completion-for-upper-character-inputs-in.patch (application/octet-stream) patch 0001
At Sun, 07 Feb 2021 13:55:00 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote in > > This looks like you're trying to force case-insensitive behavior > whether that is appropriate or not. Does not sound like a good idea. Thanks for your reply. I raise this issue because I thought all SQL command should be case-insensitive. And the set/reset/show commands work well no matter the input configuration parameter is in upper or in lower case. My modification is not good enough, but I really think it's more convenient if we can support the tab-completion for upper character inputs. =# set APPLICATION_NAME to test; SET =# show APPLICATION_name; application_name ------------------ test (1 row) From: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Sent: Monday, February 8, 2021 5:02 PM >However set doesn't. If it is what is wanted, the following change on Query_for_list_of_set_vars works (only for the case of SET/RESET commands). Thanks for your update. I applied your patch, it works well for SET/RESET commands. I added the same modification to SHOW command. The new patch(V2) can support tab completion for upper character inputs in psql for SET/RESET/SHOW commands. Regards, Tang
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