Re: [PATCH]Feature improvement for MERGE tab completion
bt22kawamotok <bt22kawamotok@oss.nttdata.com>
From: bt22kawamotok <bt22kawamotok@oss.nttdata.com>
To: Shinya Kato <Shinya11.Kato@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Date: 2022-09-12T06:53:46Z
Lists: pgsql-hackers
Attachments
- fix_tab_completion_merge_v2.patch (text/x-diff) patch v2
> else if (TailMatches("USING", MatchAny, "ON", MatchAny, "WHEN"))
> COMPLETE_WITH("MATCHED", "NOT MATCHED");
> else if (TailMatches("USING", MatchAny, "AS", MatchAny, "ON",
> MatchAny, "WHEN"))
> COMPLETE_WITH("MATCHED", "NOT MATCHED");
> else if (TailMatches("USING", MatchAny, MatchAny, "ON", MatchAny,
> "WHEN"))
> COMPLETE_WITH("MATCHED", "NOT MATCHED");
>
> I thought it would be better to describe this section as follows,
> summarizing the conditions
>
> else if (TailMatches("USING", MatchAny, "ON", MatchAny, "WHEN") ||
> TailMatches("USING", MatchAny, "AS", MatchAny, "ON", MatchAny,
> "WHEN") ||
> TailMatches("USING", MatchAny, MatchAny, "ON", MatchAny, "WHEN"))
> COMPLETE_WITH("MATCHED", "NOT MATCHED");
>
> There are similar redundancies in the tab completion of MERGE
> statement, so why not fix that as well?
Thanks for your review.
A new patch has been created to reflect the changes you indicated.
I also found a problem that "DO NOTHING" is not completed when type
"WHEN MATCHED <tab>", so I fixed it as well.
Regards,
Kotaro Kawamoto
Commits
-
Push lpp variable closer to usage in heapgetpage()
- e351f8541831 16.0 cited
-
psql: Improve tab-completion for MERGE.
- f80919df950a 15.0 landed
- 9a6915257d1d 16.0 landed