From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | masao(dot)fujii(at)gmail(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Some bugs in psql_complete of psql |
Date: | 2015-12-08 08:56:19 |
Message-ID: | 20151208.175619.245979824.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(dot)fujii(at)gmail(dot)com> wrote in <CAHGQGwGB91SNyZWnLGEytRBx1Kbi0W2PO3NnH5QG0C2g6MmbdA(at)mail(dot)gmail(dot)com>
> On Fri, Nov 6, 2015 at 11:27 AM, Kyotaro HORIGUCHI
> <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)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.kyotaro@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
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2015-12-08 09:31:10 | Re: Making tab-complete.c easier to maintain |
Previous Message | Ashutosh Bapat | 2015-12-08 08:27:52 | Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs) |