Re: 15beta1 tab completion of extension versions

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: 15beta1 tab completion of extension versions
Дата
Msg-id 20220703083217.GB2476530@rfd.leadboat.com
обсуждение исходный текст
Ответ на Re: 15beta1 tab completion of extension versions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: 15beta1 tab completion of extension versions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Jun 19, 2022 at 12:56:13AM -0400, Tom Lane wrote:
> Actually ... after further thought it seems like maybe we should
> make this more like other cases rather than less so.  ISTM that much
> of the issue here is somebody's decision that "TO version" should be
> offered as a completion of "UPDATE", which is unlike the way we do this
> anywhere else --- the usual thing is to offer "UPDATE TO" as a single
> completion.  So I'm thinking about the attached.

Which are the older completions that offer "UPDATE TO"?  I don't see any.

> This behaves a little differently from the old code.  In v14,
>     alter extension pg_trgm upd<TAB>
> gives you
>     alter extension pg_trgm update<space>
> and another <TAB> produces
>     alter extension pg_trgm update TO "1.
> 
> With this,
>     alter extension pg_trgm upd<TAB>
> gives you
>     alter extension pg_trgm update to<space>
> and another <TAB> produces
>     alter extension pg_trgm update to "1.
> 
> That seems more consistent with other cases, and it's the same
> number of <TAB> presses.

I think it makes sense to send UPDATE TO as a single completion in places
where no valid command can have the UPDATE without the TO.  CREATE RULE foo AS
ON UPDATE TO is a candidate, though CREATE RULE completion doesn't do that
today.  "ALTER EXTENSION hstore UPDATE;" is a valid command (updates to the
control file default version).  Hence, I think the v14 behavior was better.



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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: SQL/JSON functions vs. ECPG vs. STRING as a reserved word
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: Slow standby snapshot