Re: Would it be possible to add functions to tab-completion in psql? - Mailing list pgsql-general

From Julien Rouhaud
Subject Re: Would it be possible to add functions to tab-completion in psql?
Date
Msg-id 20220816135534.ppgkyfn3emn3hbwm@jrouhaud
Whole thread Raw
In response to Would it be possible to add functions to tab-completion in psql?  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: Would it be possible to add functions to tab-completion in psql?
List 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 by date:

Previous
From: Ron
Date:
Subject: Re: Would it be possible to add functions to tab-completion in psql?
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Would it be possible to add functions to tab-completion in psql?