RE: Support tab completion for upper character inputs in psql

From: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Support tab completion for upper character inputs in psql
Date: 2021-03-22 12:41:41
Message-ID: TYCPR01MB612814C94F90274B8B0D1480FB659@TYCPR01MB6128.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tuesday, March 16, 2021 5:20 AM, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:

>The cases that complete with a query
>result are not case insensitive right now. This affects things like
>
>UPDATE T<tab>
>
>as well. I think your first patch was basically right. But we need to
>understand that this affects all completions with query results, not
>just the one you wanted to fix. So you should analyze all the callers
>and explain why the proposed change is appropriate.

Thanks for your review and suggestion. Please find attached patch V3 which was based on the first patch[1].
Difference from the first patch is:

Add tab completion support for all query results in psql.
complete_from_query
+complete_from_versioned_query
+complete_from_schema_query
+complete_from_versioned_schema_query

[1] https://www.postgresql.org/message-id/a63cbd45e3884cf9b3961c2a6a95dcb7%40G08CNEXMBPEKD05.g08.fujitsu.local

The modification to support case insensitive matching in " _complete_from_query" is based on "complete_from_const and "complete_from_list" .
Please let me know if you find anything insufficient.

Regards,
Tang

Attachment Content-Type Size
V3-0001-Support-tab-completion-with-a-query-result-for-upper.patch application/octet-stream 4.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2021-03-22 12:47:38 Re: [PATCH] Bug fix in initdb output
Previous Message Sean Jezewski 2021-03-22 12:40:38 Re: PG13 fails to startup even though the current transaction is equal to the target transaction