Re: Would it be possible to add functions to tab-completion in psql?

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: Would it be possible to add functions to tab-completion in psql?
Дата
Msg-id 20220816135534.ppgkyfn3emn3hbwm@jrouhaud
обсуждение исходный текст
Ответ на Would it be possible to add functions to tab-completion in psql?  (hubert depesz lubaczewski <depesz@depesz.com>)
Ответы Re: Would it be possible to add functions to tab-completion in psql?  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
Hi,

On Tue, Aug 16, 2022 at 02:28:49PM +0200, hubert depesz lubaczewski wrote:
> Hi,
> As a dba I have to, very often, query system functions, starting with
> pg_last_xact_replay_timestamp and pg_current_wal_lsn.
>
> Would it be possible/hard/expensive, to change tab-completion so that:
>
> select pg_<tab> would work?

That specific example may be easy to do, but others like e.g.

SELECT pg_size_pretty(pg_rel<TAB>
SELECT pg_last_xact_replay_timestamp(), pg_current_w<TAB>

wouldn't.

You can refer to [1] and [2] threads for more background, but the limitations
that prevented anything from being committed until now still exist so I'm not
really hoping for anything new on that side :(  I usually have another psql
running somewhere, where I can run \df and similar, and copy/paste stuff
around.  That's not great, but still better than trying to remember the exact
spelling of all useful functions.

[1] https://www.postgresql.org/message-id/flat/CAMyN-kB_xrU4iYdcF1j%3DtijgO1DSyjtb3j96O4UEj91XZrZcMg%40mail.gmail.com
[2] https://www.postgresql.org/message-id/flat/1328820579.11241.4.camel%40vanquo.pezone.net



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

Предыдущее
От: Ron
Дата:
Сообщение: Re: Would it be possible to add functions to tab-completion in psql?
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Would it be possible to add functions to tab-completion in psql?