Re: CREATE tab completion

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: CREATE tab completion
Дата
Msg-id 20211118.172058.244719626914306841.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: CREATE tab completion  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: CREATE tab completion  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
At Thu, 18 Nov 2021 17:17:25 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> On Thu, Nov 18, 2021 at 04:25:30PM +0900, Ken Kato wrote:
> > For this part, I did the following:
> > +    else if (TailMatches("CREATE", "SEQUENCE", MatchAny, "AS") ||
> > +             TailMatches("CREATE", "TEMP|TEMPORARY", "SEQUENCE", MatchAny, "AS"))
> > +        COMPLETE_WITH("smallint", "integer", "bigint");
> > 
> > Am I doing this right? or Are there better ways to do it?
> 
> That looks fine per se.

FWIW, I would be a bit perplexed to see type names suggested in
upper-cases, even if it is acceptable by the parser.  If you type-in
the following phrase:

=# type boo<tab>

it is completed to "boolean" but,

=# type BOO<tab>

doesn't respond.

So we could use COMPLETE_WITH_CS instead so that CREATE SEQUENCE
behavess the same way with the existing behavior of TYPE.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: CREATE tab completion
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_waldump stucks with options --follow or -f and --stats or -z