Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNwC8-0003IH-U4 for pgsql-general@arkaria.postgresql.org; Tue, 16 Aug 2022 13:01:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oNwC7-0007nC-7a for pgsql-general@arkaria.postgresql.org; Tue, 16 Aug 2022 13:01:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNwC6-0007n3-T8 for pgsql-general@lists.postgresql.org; Tue, 16 Aug 2022 13:01:18 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNwC3-0000rR-Ua for pgsql-general@lists.postgresql.org; Tue, 16 Aug 2022 13:01:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=oLsmpWjS4merYj0o4jZvOCtKX2yE7IrkCKlGDnB7N2o=; b=r3BUF0HcyHLKbbwotoGYxWXgjm SpYlpnMbyE6h9n7PoyGk7FAZfEJZuEy/CY9UFK/jqrqjkjyIzIJIlwHbhLS83PgZby2NF1cKoPfL+ iu6b7dXsNowaIIUT546OZ60thZkKI12QuA/WPPlCT1Teh+/+0pgBzUjQErZpU6xH/Ios=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1oNwC2-0006TA-Aj; Tue, 16 Aug 2022 15:01:14 +0200 Date: Tue, 16 Aug 2022 15:01:14 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Ron Cc: pgsql-general@lists.postgresql.org Subject: Re: Would it be possible to add functions to tab-completion in psql? Message-ID: <20220816130114.GA22122@depesz.com> Reply-To: depesz@depesz.com References: <20220816122849.GC24417@depesz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 change tab-completion so that: > > > > select pg_ would work? > > It does, in the psql 9.6 and 12 that I installed from it's native > repositories, and the psql 12 installed from RHEL 7/8 native repositories. Hmm .. I'm on Pg 16, linked with readline, and pressing tab after select pg_ just produces new prompt: https://asciinema.org/a/A8w16KhXF7bK4iz7hE7iyyo0D Can you please show me this working, with "which psql", and "ldd $( which psql )" using asciinema? Best regards, depesz