pgcli
pgcli copied to clipboard
Add suggestion when setting the search_path
Description
To be suggested autocompletion when setting the search_path, the keyword's suggestion "search_path TO" will be suggested on a "SET" token, only if the latter is the first token of the SQL statement (to differentiate it from the "UPDATE foo SET"). Then, available schemas are suggested (after the "TO" token).
Resolves #1511
I'm open to suggestions if I did anything weirdly.
Checklist
- [x] I've added this contribution to the
changelog.rst. - [x] I've added my name to the
AUTHORSfile (or it's already there).
- [x] I installed pre-commit hooks (
pip install pre-commit && pre-commit install). - [x] Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)