Re: use of SPI by postgresImportForeignStatistics - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: use of SPI by postgresImportForeignStatistics
Date
Msg-id CAHGQGwFjrX5jROfgTYAH6E78x+YjDGVHA6z6c+x7JQjUg1P=-g@mail.gmail.com
Whole thread
In response to Re: use of SPI by postgresImportForeignStatistics  (Etsuro Fujita <etsuro.fujita@gmail.com>)
List pgsql-hackers
On Fri, Jul 10, 2026 at 8:37 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
>
> On Fri, Jul 10, 2026 at 4:40 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> > On Fri, Jul 10, 2026 at 2:37 PM Fujii Masao <masao.fujii@gmail.com> wrote:
> > > In the committed patch, I found that the set_*_arg() helper functions
> > > in postgres_fdw.c are declared static in their prototypes, but their
> > > definitions omit the static keyword. This looks like an oversight.
> > >
> > > Attached patch adds static to the definitions for consistency and
> > > to make their intended file-local scope explicit. It also fixes a few
> > > nearby comment typos.
> >
> > Good catch!  Thanks for the patch!  LGTM.
>
> My compiler (Apple clang version 17.0.0 (clang-1700.4.4.1)) doesn't
> output any error/warning about that declaration.  Actually, it's
> allowed?  Anyway, +1 for adding it for consistency.

Maybe that's allowed. I wonder adding static to both the declaration
and the definition seems mainly a matter of consistency, readability,
and coding style.

Thanks for the review! I've pushed the patch.

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Kouber Saparev
Date:
Subject: Re: BF mamba failure
Next
From: Ilia Evdokimov
Date:
Subject: Wrong argument name in error message from attribute_stats functions