use pg_strncasecmp to replace strncmp when compare "pg_"

Started by tanghy.fnst@fujitsu.comalmost 5 years ago4 messageshackers
Jump to latest
#1tanghy.fnst@fujitsu.com
tanghy.fnst@fujitsu.com

Attachments:

0001-use-pg_strncasecmp-to-replace-strncmp-when-compare-p.patchapplication/octet-stream; name=0001-use-pg_strncasecmp-to-replace-strncmp-when-compare-p.patchDownload+2-3
#2Kyotaro Horiguchi
horikyota.ntt@gmail.com
In reply to: tanghy.fnst@fujitsu.com (#1)
Re: use pg_strncasecmp to replace strncmp when compare "pg_"

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kyotaro Horiguchi (#2)
Re: use pg_strncasecmp to replace strncmp when compare "pg_"

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

#4tanghy.fnst@fujitsu.com
tanghy.fnst@fujitsu.com
In reply to: Tom Lane (#3)
RE: use pg_strncasecmp to replace strncmp when compare "pg_"

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]/messages/by-id/OS0PR01MB6113CA04E06D5BF221BC4FE2FB429@OS0PR01MB6113.jpnprd01.prod.outlook.com. Any further comment on [1]/messages/by-id/OS0PR01MB6113CA04E06D5BF221BC4FE2FB429@OS0PR01MB6113.jpnprd01.prod.outlook.com is very welcome.

[1]: /messages/by-id/OS0PR01MB6113CA04E06D5BF221BC4FE2FB429@OS0PR01MB6113.jpnprd01.prod.outlook.com

Regards,
Tang