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 1o83uC-0003c6-G4 for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Jul 2022 18:01:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o83u9-0000mi-Pt for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Jul 2022 18:01:09 +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 1o83u9-0000mZ-H4 for pgsql-hackers@lists.postgresql.org; Sun, 03 Jul 2022 18:01:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o83u3-0003QT-CY for pgsql-hackers@lists.postgresql.org; Sun, 03 Jul 2022 18:01:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 263I0xci1285254; Sun, 3 Jul 2022 14:00:59 -0400 From: Tom Lane To: Noah Misch cc: Jeff Janes , PostgreSQL Hackers Subject: Re: 15beta1 tab completion of extension versions In-reply-to: <1212507.1656858578@sss.pgh.pa.us> References: <1803867.1655596168@sss.pgh.pa.us> <1930937.1655614573@sss.pgh.pa.us> <20220703083217.GB2476530@rfd.leadboat.com> <1212507.1656858578@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 03 Jul 2022 10:29:38 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1285252.1656871259.1@sss.pgh.pa.us> Date: Sun, 03 Jul 2022 14:00:59 -0400 Message-ID: <1285253.1656871259@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Noah Misch writes: >> "ALTER EXTENSION hstore UPDATE;" is a valid command (updates to the >> control file default version). Hence, I think the v14 behavior was better. > Hmm ... good point, let me think about that. After consideration, my preferred solution is just this: diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 463cac9fb0..c5cafe6f4b 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1927,7 +1927,7 @@ psql_completion(const char *text, int start, int end) /* ALTER EXTENSION */ else if (Matches("ALTER", "EXTENSION", MatchAny)) - COMPLETE_WITH("ADD", "DROP", "UPDATE TO", "SET SCHEMA"); + COMPLETE_WITH("ADD", "DROP", "UPDATE", "SET SCHEMA"); /* ALTER EXTENSION UPDATE */ else if (Matches("ALTER", "EXTENSION", MatchAny, "UPDATE")) This will require one extra when what you want is to update to a specific version, but I doubt that that's going to bother anyone very much. I don't want to try to resurrect the v14 behavior exactly because it's too much of a mess from a quoting standpoint. regards, tom lane