Re: Avoid possible dereference null pointer (contrib/postgres_fdw/postgres_fdw.c)

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Avoid possible dereference null pointer (contrib/postgres_fdw/postgres_fdw.c)
Date: 2025-07-06 08:29:45
Message-ID: CAPmGK15QcrP-pboOA4bjcoupmyFp7_81Ao_jBqvWb6=Ut9FHMg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 4, 2025 at 2:41 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> On Wed, Jun 18, 2025 at 8:33 PM Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> > Em qua., 18 de jun. de 2025 às 07:29, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> escreveu:
> >> Considering fpextra cannot be NULL, I think the proposed change is
> >> something more than necessary. IMO I think it is more appropriate to
> >> just add an assertion and a comment for that like the attached, to
> >> avoid this kind of confusion. I think I should have done so when
> >> committing this.
> >
> > I disapprove of this change, for me it worsens readability.
> > It is better to continue without any changes, then.
> > But if there is consensus, go ahead.
>
> I'm not sure this worsens readability, but I still think it would be
> useful to avoid the same confusion in the future, so barring
> objections, I will push the patch as a master-only improvement.

Pushed after modifying the comment a little bit and fixing indentation.

Best regards,
Etsuro Fujita

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2025-07-06 09:00:00 Instability of pg_walsummary/002_blocks.pl due to timing
Previous Message Daniil Davydov 2025-07-06 08:00:32 Re: POC: Parallel processing of indexes in autovacuum