Re: Improve tab completion for USER MAPPING

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: sawada(dot)mshk(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improve tab completion for USER MAPPING
Date: 2016-06-07 07:18:55
Message-ID: 20160607.161855.114958485.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

At Tue, 7 Jun 2016 00:03:57 +0900, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote in <CAD21AoA-1eT4Oi4mkMiPsrA=UOCbUFj1AoHT1avUQHqkyXkFEg(at)mail(dot)gmail(dot)com>
> I found that the tab completion for USER MAPPING doesn't work fine.
> For example,
>
> The below is no problem.
> postgres=# create user[TAB]
> user user mapping for
>
> But this doesn't work fine. (Note that there is a white space between
> 'user' and [TAB])
> postgres=# create user [TAB]
> hoge_user masahiko pg_signal_backend
>
> After manual input of the 'mapping', 'for' is added by tab completion.
> It means that the tab completion for 'mapping' is not working.

Adding non-object in words_after_create is somewhat uneasy but it
will work. One problem with it is that the case of keywords shown
among object names don't comply with COMP_KEYWORD_CASE.

=# \set COMP_KEYWORD_CASE preserve-lower // default.
=# create user m<tab>
=# create user MAPPING FOR

I'm trying to fix this as a part of the following CF entry (now
it seems to have a bug leads to a crash, though..)

https://commitfest.postgresql.org/10/518/

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2016-06-07 08:02:29 Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116
Previous Message Albe Laurenz 2016-06-07 06:52:15 Re: Prepared statements and generic plans