From: | Shinya Kato <Shinya11(dot)Kato(at)oss(dot)nttdata(dot)com> |
---|---|
To: | bt22kawamotok <bt22kawamotok(at)oss(dot)nttdata(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH]Feature improvement for MERGE tab completion |
Date: | 2022-09-12 08:03:25 |
Message-ID: | abe74f1c1d4e83df6e71cf854c7ea56b@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-09-12 15:53, bt22kawamotok wrote:
>> 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.
Thanks for updating!
Compile errors have occurred, so can you fix them?
And I think we can eliminate similar redundancies in MERGE tab
completion and I would like you to fix them.
For example,
else if (TailMatches("WHEN", "MATCHED"))
COMPLETE_WITH("THEN", "AND");
else if (TailMatches("WHEN", "NOT", "MATCHED"))
COMPLETE_WITH("THEN", "AND");
above statement can be converted to the statement below.
else if (TailMatches("WHEN", "MATCHED") ||
TailMatches("WHEN", "NOT", "MATCHED"))
COMPLETE_WITH("THEN", "AND");
--
Regards,
--
Shinya Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | bt22kawamotok | 2022-09-12 08:13:34 | Re: is_superuser is not documented |
Previous Message | Drouvot, Bertrand | 2022-09-12 07:59:15 | Re: Add tracking of backend memory allocated to pg_stat_activity |