Thread: use pg_strncasecmp to replace strncmp when compare "pg_"

use pg_strncasecmp to replace strncmp when compare "pg_"

From
"tanghy.fnst@fujitsu.com"
Date:
Hi

When try to improve the tab compleation feature in [1], I found an existing problem and a typo.
The patch was attached, please kindly to take a look at it. Thanks.

[1]
https://www.postgresql.org/message-id/OS0PR01MB61131A4347D385F02F60E123FB469%40OS0PR01MB6113.jpnprd01.prod.outlook.com

Regards,
Tang

Attachment

Re: use pg_strncasecmp to replace strncmp when compare "pg_"

From
Kyotaro Horiguchi
Date:
At Thu, 22 Apr 2021 12:44:28 +0000, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com> wrote in 
> Hi
> 
> When try to improve the tab compleation feature in [1], I found an existing problem and a typo.
> The patch was attached, please kindly to take a look at it. Thanks.
> 
> [1]
> htdrop
indetps://www.postgresql.org/message-id/OS0PR01MB61131A4347D385F02F60E123FB469%40OS0PR01MB6113.jpnprd01.prod.outlook.com

That doesn't matter at all for now since we match schema identifiers
case-sensitively.  Maybe it should be a part of the patch in [1].

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Re: use pg_strncasecmp to replace strncmp when compare "pg_"

From
Tom Lane
Date:
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> At Thu, 22 Apr 2021 12:44:28 +0000, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com> wrote in
>> When try to improve the tab compleation feature in [1], I found an existing problem and a typo.
>> The patch was attached, please kindly to take a look at it. Thanks.

> That doesn't matter at all for now since we match schema identifiers
> case-sensitively.  Maybe it should be a part of the patch in [1].

Yeah --- maybe this'd make sense as part of a full patch to improve
tab-complete.c's handling of case folding, but I'm suspicious that
applying it on its own would just make things less consistent.

            regards, tom lane



RE: use pg_strncasecmp to replace strncmp when compare "pg_"

From
"tanghy.fnst@fujitsu.com"
Date:
On Friday, April 23, 2021 2:06 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote

>>Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
>> That doesn't matter at all for now since we match schema identifiers
>> case-sensitively.  Maybe it should be a part of the patch in [1].
>
>Yeah --- maybe this'd make sense as part of a full patch to improve
>tab-complete.c's handling of case folding, but I'm suspicious that
>applying it on its own would just make things less consistent.

Thanks for your reply. Merged this patch to [1]. Any further comment on [1] is very welcome.

[1]
https://www.postgresql.org/message-id/OS0PR01MB6113CA04E06D5BF221BC4FE2FB429%40OS0PR01MB6113.jpnprd01.prod.outlook.com

Regards,
Tang