Redundant psql tab-completion for CREATE PUBLICATION - Mailing list pgsql-hackers

From Edmund Horner
Subject Redundant psql tab-completion for CREATE PUBLICATION
Date
Msg-id CAMyN-kDe=gBmHgxWwUUaXuwK+p+7g1vChR7foPHRDLE592nJPQ@mail.gmail.com
Whole thread Raw
Responses Re: Redundant psql tab-completion for CREATE PUBLICATION  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Edmund Horner
Date:
Subject: Re: adding tab completions
Next
From: Manuel Kniep
Date:
Subject: PATCH pass PGOPTIONS to pg_regress