From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: issue in pgfdw_report_error()?
Date: Fri, 3 Dec 2021 17:41:44 +0900
Message-ID: <f3668c08-4739-9b55-e6b6-98f2b73a7f36@oss.nttdata.com> (raw)
In-Reply-To: <CALj2ACV6bxCjYHzZRw6=95KyGWFUkxrf-94HGbbEZdx8LgpkhA@mail.gmail.com>
References: <477c16c8-7ea4-20fc-38d5-ed3a77ed616c@oss.nttdata.com>
<CALj2ACVt7HcH+qD7e-grw34eyfV6+WwZYE82--rwOik==1wWBg@mail.gmail.com>
<41aae5d4-4d11-85f6-8f32-1bb5349ce959@oss.nttdata.com>
<CALj2ACVwi4jSh-4A-Kny8M6bOsypLpi8dNycEtVg4S2qsBDAfQ@mail.gmail.com>
<192a2107-7e37-64d6-c5b3-c45448ba2e9e@oss.nttdata.com>
<CALj2ACV6bxCjYHzZRw6=95KyGWFUkxrf-94HGbbEZdx8LgpkhA@mail.gmail.com>
On 2021/11/22 13:59, Bharath Rupireddy wrote:
> On Mon, Nov 22, 2021 at 8:17 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>> Well, in that case, why can't we get rid of "(message_primary != NULL"
>>> and just have "message_primary[0] != '\0' ? errmsg_internal("%s",
>>> message_primary) : errmsg("could not obtain message string for remote
>>> error")" ?
>>
>> That's possible if we can confirm that PQerrorMessage() never returns
>> NULL all the cases. I'm not sure how much it's worth doing that, though..
>> It seems more robust to check also NULL there.
>
> Okay.
>
>>> BTW, we might have to fix it in dblink_res_error too?
>>
>> Yeah, that's good idea. I included that change in the patch. Attached.
>
> Thanks. pgfdw_report_error_v2 patch looks good to me.
Pushed. Thanks!
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: masao.fujii@oss.nttdata.com, bharath.rupireddyforpostgres@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: issue in pgfdw_report_error()?
In-Reply-To: <f3668c08-4739-9b55-e6b6-98f2b73a7f36@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox