Re: 15beta1 tab completion of extension versions

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-06-19T04:56:13Z
Lists: pgsql-hackers

Attachments

I wrote:
> Jeff Janes <jeff.janes@gmail.com> writes:
>> Putting pg_catalog.quote_ident back
>> into Query_for_list_of_available_extension_versions* fixes it, but might
>> not be the best way to fix it.

> Yeah, that seems like the appropriate fix.  Done, thanks for the report!

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.

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.

			regards, tom lane

Commits

  1. Simplify tab completion of extension versions, redux.

  2. Simplify tab completion of extension versions.

  3. Fix busted tab completion of extension versions.

  4. psql: improve tab-complete's handling of variant SQL names.