From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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, 3 Jul 2022 01:32:17 -0700
Message-ID: <20220703083217.GB2476530@rfd.leadboat.com> (raw)
In-Reply-To: <1930937.1655614573@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>
On Sun, Jun 19, 2022 at 12:56:13AM -0400, Tom Lane wrote:
> Actually ... after further thought it seems like maybe we should
> make this more like other cases rather than less so. ISTM that much
> of the issue here is somebody's decision that "TO version" should be
> offered as a completion of "UPDATE", which is unlike the way we do this
> anywhere else --- the usual thing is to offer "UPDATE TO" as a single
> completion. So I'm thinking about the attached.
Which are the older completions that offer "UPDATE TO"? I don't see any.
> This behaves a little differently from the old code. In v14,
> alter extension pg_trgm upd<TAB>
> gives you
> alter extension pg_trgm update<space>
> and another <TAB> produces
> alter extension pg_trgm update TO "1.
>
> With this,
> alter extension pg_trgm upd<TAB>
> gives you
> alter extension pg_trgm update to<space>
> and another <TAB> produces
> alter extension pg_trgm update to "1.
>
> That seems more consistent with other cases, and it's the same
> number of <TAB> presses.
I think it makes sense to send UPDATE TO as a single completion in places
where no valid command can have the UPDATE without the TO. CREATE RULE foo AS
ON UPDATE TO is a candidate, though CREATE RULE completion doesn't do that
today. "ALTER EXTENSION hstore UPDATE;" is a valid command (updates to the
control file default version). Hence, I think the v14 behavior was better.
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: noah@leadboat.com, tgl@sss.pgh.pa.us, jeff.janes@gmail.com
Subject: Re: 15beta1 tab completion of extension versions
In-Reply-To: <20220703083217.GB2476530@rfd.leadboat.com>
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>
* 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