Add a few new patterns to the tab completion of psql
authorMichael Paquier <michael@paquier.xyz>
Wed, 5 Oct 2022 02:46:10 +0000 (11:46 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 5 Oct 2022 02:46:10 +0000 (11:46 +0900)
commit9aa58d48f30a0cadfc0f40aad22be91ae7f8c4a8
treeae3778722dade21b4f9464c156b70d767130e1f8
parentbdf9b60085bca2dbb0af920d50f1a0917dda0cbb
Add a few new patterns to the tab completion of psql

This improves the tab completion of psql on a few points:
- Provide a list of subscriptions on \dRs.
- Provide a list of publications on \dRp.
- Add CURRENT_ROLE, CURRENT_USER, SESSION_USER when OWNER TO is provided
at the end of a query (as defined by RoleSpec in gram.y).

Author: Vignesh C
Reviewed-by: Dagfinn Ilmari Mannsåker
Discussion: https://postgr.es/m/CALDaNm3toRBt6c6saY3174f7CsGztXRvVvfWbikkJEXY7x5WAA@mail.gmail.com
src/bin/psql/tab-complete.c