Re: [Patch] Make pg_checksums skip foreign tablespace directories - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [Patch] Make pg_checksums skip foreign tablespace directories
Date
Msg-id 20200223070858.GB1792@paquier.xyz
Whole thread Raw
In response to Re: [Patch] Make pg_checksums skip foreign tablespace directories  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: [Patch] Make pg_checksums skip foreign tablespace directories
List pgsql-hackers
On Fri, Feb 21, 2020 at 05:37:15PM +0900, Kyotaro Horiguchi wrote:
> The two str[n]cmps are different only in matching length. I don't
> think we don't need to differentiate the two message there, so we
> could reduce the code as:
>
> | cmplen = strlen(excludeFiles[].name);
> | if (!prefix_patch)
> |   cmplen++;
> | if (strncmp(d_name, excludeFilep.name, cmplen) == 0)
> |   ...

Good idea.  Let's do things as you suggest.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Shay Rojansky
Date:
Subject: Re: Error on failed COMMIT
Next
From: Michael Paquier
Date:
Subject: Re: [Patch] Make pg_checksums skip foreign tablespace directories