From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Remove "FROM" in "DELETE FROM" when using tab-completion |
Date: | 2021-05-10 05:59:06 |
Message-ID: | 20210510055906.yeaasc7n7kt3qmjx@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, May 10, 2021 at 11:21:11AM +0530, Dilip Kumar wrote:
> On Mon, May 10, 2021 at 11:17 AM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> >
> > On Mon, May 10, 2021 at 05:36:35AM +0000, tanghy(dot)fnst(at)fujitsu(dot)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 "DELETE" to "DELETE FROM" but no reason added.
> > >
> > > IMO, the "FROM" is unnecessary just like "INTO" for "INSERT" command. So I tried to fix the inconsistency by removing "FROM" from "DELETE FROM" in tab-complete.c.
> > > Please see the attached patch. Any comment or different thought is very welcome.
> >
> > 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
> > rather than asking that to autocomplete in multiple steps.
> >
> > Now, the \help command is for commands, which is a different thing as the
> > command in that case is DELETE not DELETE FROM, even if you will have to follow
> > your DELETE with a FROM.
>
> I agree with Julien. But, I also agree with the consistency point
> from Tang. So maybe we can fix the insert and add INSERT INTO in the
> tab completion?
+1 for that.
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2021-05-10 06:01:58 | Re: Parallel INSERT SELECT take 2 |
Previous Message | Michael Paquier | 2021-05-10 05:57:21 | Re: Small issues with CREATE TABLE COMPRESSION |