Re: [PATCH] support tab-completion for single quote input with equal sign - Mailing list pgsql-hackers

From torikoshia
Subject Re: [PATCH] support tab-completion for single quote input with equal sign
Date
Msg-id 372b6e1165ca34eb738487b362fbf3b6@oss.nttdata.com
Whole thread Raw
In response to Re: [PATCH] support tab-completion for single quote input with equal sign  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: [PATCH] support tab-completion for single quote input with equal sign
List pgsql-hackers
On Thursday, July 22, 2021 1:05 PM, tanghy(dot)fnst(at)fujitsu(dot)com 
<tanghy(dot)fnst(at)fujitsu(dot)com> wrote
> I found a problem when using tab-completion as follows:
> 
> CREATE SUBSCRIPTION my_subscription
> CONNECTION 'host=localhost port=5432 dbname=postgres' [TAB]
> 
> The word 'PUBLICATION' couldn't be auto completed as expected.

I too wondered about this behavior.

> v3-0001-support-tab-completion-for-CONNECTION-string-with.patch

I applied the patch and succeeded in the above case, but failed in the 
below case.

   =# CREATE SUBSCRIPTION s1 CONNECTION 'a=' PUBLICATION p1 <tab>

Before applying the patch, 'WITH (' was completed, but now it completes 
nothing since it matches the below condition:

>    18 +   else if ((HeadMatches("CREATE", "SUBSCRIPTION", MatchAny, 
> "CONNECTION", MatchAny)))
>    19 +   {

I updated the patch going along with the v3 direction.

What do you think?


-- 
Regards,

--
Atsushi Torikoshi
NTT DATA CORPORATION
Attachment

pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: Use windows VMs instead of windows containers on the CI
Next
From: Robert Haas
Date:
Subject: Re: split TOAST support out of postgres.h