Re: psql: fix variable existence tab completion - Mailing list pgsql-hackers

From Anton A. Melnikov
Subject Re: psql: fix variable existence tab completion
Date
Msg-id 836a0c2c-b4fe-4efb-bf86-b6b3271bedfe@postgrespro.ru
Whole thread Raw
In response to Re: psql: fix variable existence tab completion  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: psql: fix variable existence tab completion
List pgsql-hackers
Hi, Alexander!

On 06.05.2024 13:19, Alexander Korotkov wrote:
>> The patch attached fix the 010_tab_completion.pl test in the same way like [1].
> 
> Thank you for the fix.  As I get, the fix teaches
> 010_tab_completion.pl to tolerate the invalid result of tab
> completion.  Do you think we could fix it another way to make the
> result of tab completion correct?

Right now i don't see any straight way to fix this to the correct tab completion.
There are several similar cases in this test.
E.g., for such a commands:
  
  CREATE TABLE "mixedName" (f1 int, f2 text);
  select * from "mi<TAB> ;

gives with debian 10:
postgres=# select * from \"mixedName\" ;

resulting in an error.
  
Now there is a similar workaround in the 010_tab_completion.pl with regex: qr/"mixedName\\?" /

I think if there were or will be complaints from users about this behavior in Debian 10,
then it makes sense to look for more complex solutions that will fix a backslash substitutions.
If no such complaints, then it is better to make a workaround in test.

With the best wishes,

-- 
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Use pgstat_kind_infos to read fixed shared stats structs
Next
From: Jakub Wartak
Date:
Subject: Re: elog/ereport VS misleading backtrace_function function address