> + else if (TailMatches("MERGE", "INTO", MatchAny, "USING") ||
> + TailMatches("MERGE", "INTO", MatchAny, MatchAny, "USING") ||
> + TailMatches("MERGE", "INTO", MatchAny, "AS", MatchAny, "USING"))
> COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables);
>
> + else if (TailMatches("MERGE", "INTO", MatchAny, "AS", MatchAny,
> "USING") ||
> + TailMatches("MERGE", "INTO", MatchAny, MatchAny, "USING"))
> COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables);
>
> The latter seems redundant and can be removed. The former seems to
> cover all the cases where the latter covers.
> + else if (TailMatches("USING", MatchAny, "ON", MatchAny) ||
> + TailMatches("USING", MatchAny, "ON", MatchAny,
> MatchAnyExcept("When"), MatchAnyExcept("When")) ||
> + TailMatches("USING", MatchAny, "AS", MatchAny, "ON", MatchAny) ||
> + TailMatches("USING", MatchAny, "AS", MatchAny, "ON", MatchAny,
> MatchAnyExcept("When"), MatchAnyExcept("When")) ||
> + TailMatches("USING", MatchAny, MatchAny, "ON", MatchAny) ||
> + TailMatches("USING", MatchAny, MatchAny, "ON", MatchAny,
> MatchAnyExcept("When"), MatchAnyExcept("When")))
>
> "When" should be "WHEN"?
>
>
> Regards,
Thanks for reviewing.
Sorry for making such a simple mistake.
I fixed it in v6.
> Not only table but also view, foreign table, etc can be specified after
> USING in MERGE command. So ISTM that Query_for_list_of_selectables
> should be used at the above tab-completion, instead of
> Query_for_list_of_tables.
> Thought?
That's nice idea!
I took that in v6.
Regards,
Kotaro Kawamoto