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

2022-08-16 Thread Peter Eisentraut
On 16.08.22 16:14, hubert depesz lubaczewski wrote: Specifically, I'd ask what is the harm of increasing what tab completion can do by a lot - for example, make it tab-complete fields from all tables. And make it possible to tab-complete column name anywhere in where clause. But function name in

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

2022-08-16 Thread Bzm@g
> 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_ would work? Not what you asked for, but anyway, I use \sf pg_ and copy the

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

2022-08-16 Thread hubert depesz lubaczewski
On Tue, Aug 16, 2022 at 10:10:55AM -0400, Tom Lane wrote: > There is nothing principled about assuming that the first word > after SELECT is a function name. It'd be even less principled to > provide tab completion only for function names beginning with > "pg_". So this idea seems like a wart rat

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

2022-08-16 Thread Tom Lane
hubert depesz lubaczewski writes: > I know we can tab-complete relations. But we can't functions. There is nothing principled about assuming that the first word after SELECT is a function name. It'd be even less principled to provide tab completion only for function names beginning with "pg_".

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

2022-08-16 Thread hubert depesz lubaczewski
On Tue, Aug 16, 2022 at 08:51:49AM -0500, Ron wrote: > On 8/16/22 08:01, hubert depesz lubaczewski wrote: > > On Tue, Aug 16, 2022 at 07:42:27AM -0500, Ron wrote: > > > On 8/16/22 07:28, hubert depesz lubaczewski wrote: > > > > Hi, > > > > As a dba I have to, very often, query system functions, sta

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

2022-08-16 Thread hubert depesz lubaczewski
On Tue, Aug 16, 2022 at 09:55:34PM +0800, Julien Rouhaud wrote: > 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 b

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

2022-08-16 Thread Julien Rouhaud
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

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

2022-08-16 Thread Ron
On 8/16/22 08:01, hubert depesz lubaczewski wrote: On Tue, Aug 16, 2022 at 07:42:27AM -0500, Ron wrote: On 8/16/22 07:28, 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

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

2022-08-16 Thread hubert depesz lubaczewski
On Tue, Aug 16, 2022 at 07:42:27AM -0500, Ron wrote: > On 8/16/22 07:28, 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 chan

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

2022-08-16 Thread Ron
On 8/16/22 07:28, 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_ would work? It does, in the psql

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

2022-08-16 Thread hubert depesz lubaczewski
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_ would work? Best regards, depesz