Re: \h tab-completion

From: Beena Emerson <memissemerson(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \h tab-completion
Date: 2017-01-25 06:15:43
Message-ID: CAOG9ApETkTsbye1jR2r-euGrGPXEw_MurDcpu4oVxDtq6QxRyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 25, 2017 at 11:43 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com
> wrote:

> On Wed, Jan 25, 2017 at 3:03 PM, Beena Emerson <memissemerson(at)gmail(dot)com>
> wrote:
> > I think the following change in tab-complete.c would do the trick.
> >
> > - else if (Matches1("ALTER"))
> > + else if (TailMatches1("ALTER"))
>
> Nope. This change breaks a bunch of subcommands, take for example
> ALTER TABLE foo ALTER, which would be completed to all the potential
> objects of ALTER commands with your patch, but in this case for
> example we just need to look at the column names, CONSTRAINT and
> COLUMN. CREATE is not part of any subcommands so that's easy to see it
> work with \h. What I think you should do is making the code path of
> \\h smarter with some exceptions by using TailMatchesCS2() for ALTER.
> There is as well the case of DROP commands that should be treated by
> the way.
>
>
I feared the same.
I will check this.

--
Thank you,

Beena Emerson

Have a Great Day!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-01-25 07:02:26 Re: [PATCH] Transaction traceability - txid_status(bigint)
Previous Message Michael Paquier 2017-01-25 06:13:55 Re: \h tab-completion