Make saner the tab completion of INSERT and DELETE in psql
authorMichael Paquier <michael@paquier.xyz>
Thu, 13 May 2021 00:48:28 +0000 (09:48 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 13 May 2021 00:48:28 +0000 (09:48 +0900)
commit1906cc07d90a8e58fd381dba43c1085e9231f236
treecfee5c6d84c55ebf21d6dd556072cd25f8dfe230
parentdb16c656478b815627a03bb0a31833391a733eb0
Make saner the tab completion of INSERT and DELETE in psql

When specified directly as DML queries, INSERT was not getting always
completed to "INSERT INTO", same for DELETE with "DELETE FROM".  This
makes the completion behavior more consistent for both commands, saving
a few keystrokes.

Commands on policies, triggers, grant/revoke, etc. require only DELETE
as completion keyword.

Author: Haiying Tang
Reviewed-by: Dilip Kumar, Julien Rouhaud
Discussion: https://postgr.es/m/OS0PR01MB61135AE2B07CCD1AB8C6A0F6FB549@OS0PR01MB6113.jpnprd01.prod.outlook.com
src/bin/psql/tab-complete.c