Re: Improve tab completion for USER MAPPING - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Improve tab completion for USER MAPPING
Date
Msg-id 20160607.161855.114958485.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Improve tab completion for USER MAPPING  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
Hi,

At Tue, 7 Jun 2016 00:03:57 +0900, Masahiko Sawada <sawada.mshk@gmail.com> wrote in
<CAD21AoA-1eT4Oi4mkMiPsrA=UOCbUFj1AoHT1avUQHqkyXkFEg@mail.gmail.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





pgsql-hackers by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: Prepared statements and generic plans
Next
From: Ashutosh Bapat
Date:
Subject: Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116