From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: 15beta1 tab completion of extension versions
Date: Sun, 03 Jul 2022 14:00:59 -0400
Message-ID: <1285253.1656871259@sss.pgh.pa.us> (raw)
In-Reply-To: <1212507.1656858578@sss.pgh.pa.us>
References: <CAMkU=1yV+egSYrzWvbDY8VZ6bKEMrKbzxr-HTuiHi+wDgSUMgA@mail.gmail.com>
<1803867.1655596168@sss.pgh.pa.us>
<1930937.1655614573@sss.pgh.pa.us>
<20220703083217.GB2476530@rfd.leadboat.com>
<1212507.1656858578@sss.pgh.pa.us>
I wrote:
> Noah Misch <noah@leadboat.com> 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:
inline patch 1: src/bin/psql/tab-complete.c (+1/-1 lines) download inline-1.patchdiff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.cindex 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 <name> */
else if (Matches("ALTER", "EXTENSION", MatchAny))
- COMPLETE_WITH("ADD", "DROP", "UPDATE TO", "SET SCHEMA");+ COMPLETE_WITH("ADD", "DROP", "UPDATE", "SET SCHEMA");
/* ALTER EXTENSION <name> UPDATE */
else if (Matches("ALTER", "EXTENSION", MatchAny, "UPDATE"))
This will require one extra <TAB> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, jeff.janes@gmail.com
Subject: Re: 15beta1 tab completion of extension versions
In-Reply-To: <1285253.1656871259@sss.pgh.pa.us>
References: <CAMkU=1yV+egSYrzWvbDY8VZ6bKEMrKbzxr-HTuiHi+wDgSUMgA@mail.gmail.com> <1803867.1655596168@sss.pgh.pa.us> <1930937.1655614573@sss.pgh.pa.us> <20220703083217.GB2476530@rfd.leadboat.com> <1212507.1656858578@sss.pgh.pa.us> <1285253.1656871259@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox