Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-12 Thread Michael Paquier
On Tue, May 11, 2021 at 10:48:16AM +, tanghy.f...@fujitsu.com wrote: > Thanks for your kindly explanation. That's really nice of you. > Understand now. Thanks for the updated patch. Applied as of 1906cc0. -- Michael signature.asc Description: PGP signature

RE: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-11 Thread tanghy.f...@fujitsu.com
On Tuesday, May 11, 2021 6:55 PM, Dilip Kumar wrote: >Basically, it just complete with USING, now after USING tab-completion >support is not yet there, e.g. DELETE FROM t1 USING t1 WHERE cond. >but the current code will not suggest anything after USING. Thanks for your kindly explanation. That's

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-11 Thread Dilip Kumar
On Tue, May 11, 2021 at 3:03 PM tanghy.f...@fujitsu.com wrote: > > On Tuesday, May 11, 2021 5:44 PM, Dilip Kumar wrote: > >But your patch is doing nothing to add the implementation for DELETE.. > >USING. Basically, the tab completion support for DELETEUSING is > >still pending right? > > I s

RE: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-11 Thread tanghy.f...@fujitsu.com
On Tuesday, May 11, 2021 5:44 PM, Dilip Kumar wrote: >But your patch is doing nothing to add the implementation for DELETE.. >USING. Basically, the tab completion support for DELETEUSING is >still pending right? I see, maybe I have a misunderstanding here, I thought tab completion for "DELE

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-11 Thread Dilip Kumar
On Tue, May 11, 2021 at 1:00 PM tanghy.f...@fujitsu.com wrote: > > On Tuesday, May 11, 2021 2:53 PM, Michael Paquier wrote > >else if (TailMatches("DELETE", "FROM", MatchAny)) > >COMPLETE_WITH("USING", "WHERE"); > >- /* XXX: implement tab completion for DELETE ... USING */ > > >

RE: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-11 Thread tanghy.f...@fujitsu.com
On Tuesday, May 11, 2021 2:53 PM, Michael Paquier wrote >else if (TailMatches("DELETE", "FROM", MatchAny)) >COMPLETE_WITH("USING", "WHERE"); >- /* XXX: implement tab completion for DELETE ... USING */ > >Why are you removing that? This sentence is still true, no? IIRC, XXX in c

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-10 Thread Michael Paquier
On Mon, May 10, 2021 at 07:14:54PM +0530, Dilip Kumar wrote: > LGTM. No objections from me to what you are doing here. else if (TailMatches("DELETE", "FROM", MatchAny)) COMPLETE_WITH("USING", "WHERE"); - /* XXX: implement tab completion for DELETE ... USING */ Why are you remov

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-10 Thread Dilip Kumar
On Mon, May 10, 2021 at 5:57 PM tanghy.f...@fujitsu.com wrote: > > On Monday, May 10, 2021 4:15 PM, Julien Rouhaud wrote > >We should change all to DELETE FROM (apart from \help of course), and same > >for > >INSERT, change to INSERT INTO everywhere it makes sense. > > Thanks for the reply. Your

RE: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-10 Thread tanghy.f...@fujitsu.com
On Monday, May 10, 2021 4:15 PM, Julien Rouhaud wrote >We should change all to DELETE FROM (apart from \help of course), and same for >INSERT, change to INSERT INTO everywhere it makes sense. Thanks for the reply. Your advice sounds reasonable to me. So I tried to change all "DELETE" to "DELETE F

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-10 Thread Julien Rouhaud
On Mon, May 10, 2021 at 06:36:19AM +, tanghy.f...@fujitsu.com wrote: > On Monday, May 10, 2021 2:48 PM, Julien Rouhaud worte > >I think the behavior now is correct. The goal of autocompletion is to save > >keystrokes and time. As the only valid keyword after a DELETE (at least in a > >Delet

RE: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-09 Thread tanghy.f...@fujitsu.com
On Monday, May 10, 2021 2:48 PM, Julien Rouhaud worte >I think the behavior now is correct. The goal of autocompletion is to save >keystrokes and time. As the only valid keyword after a DELETE (at least in a >DeleteStmt) is FROM, it's a good thing that you get back "DELETE FROM" directly >rathe

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-09 Thread Julien Rouhaud
On Mon, May 10, 2021 at 11:21:11AM +0530, Dilip Kumar wrote: > On Mon, May 10, 2021 at 11:17 AM Julien Rouhaud wrote: > > > > On Mon, May 10, 2021 at 05:36:35AM +, tanghy.f...@fujitsu.com wrote: > > > You see, the tab-completion for "DELETE" is "DELETE FROM" which is not > > > same as help-co

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-09 Thread Dilip Kumar
On Mon, May 10, 2021 at 11:17 AM Julien Rouhaud wrote: > > On Mon, May 10, 2021 at 05:36:35AM +, tanghy.f...@fujitsu.com wrote: > > You see, the tab-completion for "DELETE" is "DELETE FROM" which is not same > > as help-command said(which is "DELETE"). > > I tried to figure out why "FROM" is

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-09 Thread Julien Rouhaud
On Mon, May 10, 2021 at 05:36:35AM +, tanghy.f...@fujitsu.com wrote: > You see, the tab-completion for "DELETE" is "DELETE FROM" which is not same > as help-command said(which is "DELETE"). > I tried to figure out why "FROM" is introduced here, but no good result got. > In [1] someone changed