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 1oNx6D-0005JT-Fd for pgsql-general@arkaria.postgresql.org; Tue, 16 Aug 2022 13:59:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oNx6C-0001rx-7i for pgsql-general@arkaria.postgresql.org; Tue, 16 Aug 2022 13:59:16 +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 1oNx6B-0001rn-RI for pgsql-general@lists.postgresql.org; Tue, 16 Aug 2022 13:59:15 +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 1oNx69-0001QC-V5 for pgsql-general@postgresql.org; Tue, 16 Aug 2022 13:59:15 +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=nxNepNOvADeQKJKXvlgURsEhQiTWEDsJyKosRmS+e5M=; b=LNO+Q4ae4F74Ddyv/Xv4L5Rr6p UpR3/D91ePMTczQf/JvhaZPXJK4QQNW/TqCgJIuqkop4b5tqNNFfzAXjxxLY9mBn9kdrMBAOBCPCs +NL7/zoXjZcNRfV/7FPhyzHaSnMKmeHkph+va+TqXxW3Pqi+zly7iNdbGdDX5Ul8E474=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1oNx69-0004MO-3Y; Tue, 16 Aug 2022 15:59:13 +0200 Date: Tue, 16 Aug 2022 15:59:12 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Julien Rouhaud Cc: pgsql-general mailing list Subject: Re: Would it be possible to add functions to tab-completion in psql? Message-ID: <20220816135912.GA14225@depesz.com> Reply-To: depesz@depesz.com References: <20220816122849.GC24417@depesz.com> <20220816135534.ppgkyfn3emn3hbwm@jrouhaud> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220816135534.ppgkyfn3emn3hbwm@jrouhaud> 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 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 be possible/hard/expensive, to change tab-completion so that: > > > > select pg_ would work? > That specific example may be easy to do, but others like e.g. > SELECT pg_size_pretty(pg_rel While I would appreciate having full tab-completion on every level, I wouldn't be happy with just first-level. Basically I feel that "because we can't get it perfect" it obscuring the fact that imperfect would be very useful. Best regards, depesz