Hello, thank you for reviewing.

# I injured at fingertip, It's quite nuisance and make me more
# slower to type in..

I posted another patch to totally refactor psql-complete so I
don't put revised patch of this for now but this discussion has
an importance for me so please continue to discuss on this a bit
more with me.

At Fri, 4 Dec 2015 22:39:08 +0900, Fujii Masao <masao.fu...@gmail.com> wrote in 
<cahgqgwgb91snyzwnlgeytrbx1kbi0w2po3nnh5qg0c2g6mm...@mail.gmail.com>
> On Fri, Nov 6, 2015 at 11:27 AM, Kyotaro HORIGUCHI
> <horiguchi.kyot...@lab.ntt.co.jp> wrote:
> > Hello, thank you for the comments.
> >
> > The revised version of this patch is attached.
> 
> Thanks for updating the patch!
> 
> I tested whether the following patterns work as expected or not.
> 
> CREATE UNIQUE INDEX CONCURRENTLY name ON
> CREATE UNIQUE INDEX CONCURRENTLY ON
> CREATE UNIQUE INDEX name ON
> CREATE UNIQUE INDEX ON
> CREATE INDEX CONCURRENTLY name ON
> CREATE INDEX CONCURRENTLY ON
> CREATE INDEX name ON
> CREATE INDEX ON
> 
> Then I found the following problems.
> 
> "CREATE UNIQUE INDEX CONCURRENTLY <tab>" didn't suggest "ON".

This worked fine for me..

> "CREATE UNIQUE INDEX ON <tab>" suggested nothing.
> "CREATE INDEX ON <tab>" suggested nothing.

Oops... The comment for the entry says (tab-complete.c:2355 @
master).

|  * Complete INDEX <name> ON <table> with a list of table columns (which
|  * should really be in parens)

But it was *actually* a completion for "INDEX [CONCURRENTLY] ON
name" or "INDEX name ON" in doubtful way. I broke it by fixing it
so as to fit the comment. I saw the same kind of doubtfulness at
some place and this is one of the nuisance of the current
implement. I proposed to use regex-like minilanguage in another
thread. This enables write matching description by almost the
same format as what currently written as comments. What do you
think about this? (I'll post this later.)

http://www.postgresql.org/message-id/20151126.144512.10228250.horiguchi.kyot...@lab.ntt.co.jp


> "CREATE INDEX CONCURRENTLY <tab>" didn't suggest "ON".

This is not suggested before this.


> BTW, I found that tab-completion for DROP INDEX has the following problems.
> 
> "DROP INDEX <tab>" didn't suggest "CONCURRENTLY".
> "DROP INDEX CONCURRENTLY name <tab>" suggested nothing.

Yeah, these are the same behavior with the current. We shall find
many instances of this kind of incompleteness of completion in
the current implelent. But the current way prohibits us from
enrich the completion in this direction, I believe.


regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to