Re: Added missing tab completion for alter subscription set option

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Added missing tab completion for alter subscription set option
Дата
Msg-id 20210518155045.GA25686@alvherre.pgsql
обсуждение исходный текст
Ответ на Added missing tab completion for alter subscription set option  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Added missing tab completion for alter subscription set option  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: Added missing tab completion for alter subscription set option  (vignesh C <vignesh21@gmail.com>)
Re: Added missing tab completion for alter subscription set option  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
On 2021-May-14, vignesh C wrote:

> While I was reviewing one of the logical decoding features, I found
> Streaming and binary options were missing in tab completion for the
> alter subscription set option, the attached patch has the changes for
> the same.
> Thoughts?

I wish we didn't have to keep knowledge in the psql source on which
option names are to be used for each command.  If we had some function
 SELECT pg_completion_options('alter subscription set');
that returned the list of options usable for each command, we wouldn't
have to ... psql would just retrieve the list of options for the current
command.

Maintaining such a list does not seem hard -- for example we could just
have a function alongside parse_subscription_option() that returns the
names that are recognized by that one.  If we drive the implementation
of both off a single struct, it would never be outdated.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"[PostgreSQL] is a great group; in my opinion it is THE best open source
development communities in existence anywhere."                (Lamar Owen)



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PG 14 release notes, first draft
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: PG 14 release notes, first draft