Re: Remove a unnecessary backslash in CopyFrom

Lists: pgsql-hackers
From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Remove a unnecessary backslash in CopyFrom
Date: 2024-11-12 02:46:09
Message-ID: 20241112114609.4175a2e175282edd1463dbc6@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I found a unnecessary backslash in CopyFrom().

if (cstate->opts.reject_limit > 0 && \
cstate->num_errors > cstate->opts.reject_limit)

It can be removed because this is not in a macro.
I've attached a patch.

Regards,
Yugo Nagata

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
remove_a_unnecessary_backslash.patch text/x-diff 553 bytes

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove a unnecessary backslash in CopyFrom
Date: 2024-11-12 02:58:50
Message-ID: CAHewXNm5m4_rouYK8PNF+0jDJN+mRNJVsTx6aS0SOYm2Gq89FQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> 于2024年11月12日周二 10:46写道:

> Hi,
>
> I found a unnecessary backslash in CopyFrom().
>
> if (cstate->opts.reject_limit > 0 && \
> cstate->num_errors > cstate->opts.reject_limit)
>
> It can be removed because this is not in a macro.
> I've attached a patch.
>

Yeah, agree. The patch LGTM.

--
Thanks,
Tender Wang


From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Tender Wang <tndrwang(at)gmail(dot)com>, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove a unnecessary backslash in CopyFrom
Date: 2024-11-12 03:31:14
Message-ID: fda2a4e5-ad12-4648-9eb4-3dd2fd904ab6@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2024/11/12 11:58, Tender Wang wrote:
>
>
> Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp <mailto:nagata(at)sraoss(dot)co(dot)jp>> 于2024年11月12日周二 10:46写道:
>
> Hi,
>
> I found a unnecessary backslash in CopyFrom().
>
>             if (cstate->opts.reject_limit > 0 && \
>                 cstate->num_errors > cstate->opts.reject_limit)
>
> It can be removed because this is not in a macro.
> I've attached a patch.
>
>
> Yeah, agree. The patch LGTM.

Thanks for the report and patch! This is a mistake in commit 4ac2a9bece.
I'll commit the patch.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION


From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Tender Wang <tndrwang(at)gmail(dot)com>, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove a unnecessary backslash in CopyFrom
Date: 2024-11-15 17:08:43
Message-ID: 8de34cea-e6a0-40d7-a1f4-b8886fb5a3d1@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2024/11/12 12:31, Fujii Masao wrote:
>
>
> On 2024/11/12 11:58, Tender Wang wrote:
>>
>>
>> Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp <mailto:nagata(at)sraoss(dot)co(dot)jp>> 于2024年11月12日周二 10:46写道:
>>
>>     Hi,
>>
>>     I found a unnecessary backslash in CopyFrom().
>>
>>                  if (cstate->opts.reject_limit > 0 && \
>>                      cstate->num_errors > cstate->opts.reject_limit)
>>
>>     It can be removed because this is not in a macro.
>>     I've attached a patch.
>>
>>
>> Yeah, agree. The patch LGTM.
>
> Thanks for the report and patch! This is a mistake in commit 4ac2a9bece.
> I'll commit the patch.

Pushed. Thanks!

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION