Re: 15beta1 tab completion of extension versions - Mailing list pgsql-hackers

From Noah Misch
Subject Re: 15beta1 tab completion of extension versions
Date
Msg-id 20220703083217.GB2476530@rfd.leadboat.com
Whole thread Raw
In response to Re: 15beta1 tab completion of extension versions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 15beta1 tab completion of extension versions
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: SQL/JSON functions vs. ECPG vs. STRING as a reserved word
Next
From: Andrey Borodin
Date:
Subject: Re: Slow standby snapshot