Re: Support tab completion for upper character inputs in psql

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: tanghy.fnst@fujitsu.com, smithpb2250@gmail.com, peter.eisentraut@enterprisedb.com, david.zhang@highgo.ca, pgsql-hackers@lists.postgresql.org
Date: 2021-04-23T03:17:19Z
Lists: pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> All usages of pg_string_tolower don't need a copy.
> So don't we change the function to in-place converter?

Doesn't seem like a good idea, because that locks us into an assumption
that the downcasing conversion doesn't change the string's physical
length.  There are a lot of counterexamples to that :-(.  I'm not sure
that we actually implement such cases correctly today, but let's not
build APIs that prevent it from being fixed.

			regards, tom lane



Commits

  1. Fix minor memory leaks in psql's tab completion.

  2. Further tweaks for psql's new tab-completion logic.

  3. Treat case of tab-completion keywords a bit more carefully.

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

  5. Make PQcancel use the PGconn's tcp_user_timeout and keepalives settings.

  6. Use a WaitLatch for vacuum/autovacuum sleeping