Redundant psql tab-completion for CREATE PUBLICATION
Edmund Horner <ejrh00@gmail.com>
From: Edmund Horner <ejrh00@gmail.com>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2018-05-29T12:58:07Z
Lists: pgsql-hackers
Attachments
- remove-redundant-create-publication-completion.patch (application/octet-stream) patch
Hi,
While looking at Justin's patch for VACUUM completions, I found an
existing bit of code that tries to match on a word with a space:
/* Complete "CREATE PUBLICATION <name> FOR TABLE <table>" */
else if (Matches4("CREATE", "PUBLICATION", MatchAny, "FOR TABLE"))
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
I think the clause will never match the "FOR TABLE" word; and can, in
any case, be removed, as the the final check for completable "things"
(at the end of psql_completion) will see "TABLE" and act
appropriately.
Here's a little patch to remove these lines.
Edmund
Commits
-
Fix bogus tab-completion rule for CREATE PUBLICATION.
- e8fe426baa9c 12.0 landed
- e8d118fe859c 10.6 landed
- 45a2d45f4ff2 11.0 landed