Re: Add missing CustomPathMethods on typedefs.list

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matheus Alcantara" <matheusssilv97(at)gmail(dot)com>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add missing CustomPathMethods on typedefs.list
Date: 2026-07-07 14:17:11
Message-ID: 1841389.1783433831@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Matheus Alcantara" <matheusssilv97(at)gmail(dot)com> writes:
> While reading src/include/nodes/extensible.h, I noticed that
> CustomPathMethods was not correctly indented; this was because its
> declaration was missing on typedefs.list. The attached patch fixes this.

In the end, typedefs.list is a mechanically generated file: the
authoritative list is whatever our buildfarm says it is. So trying
to force things is not helpful, because the change won't survive to
the end of the dev cycle.

The reason CustomPathMethods is not showing up in the generated list
is that it is not used anywhere to declare an object (variable, field,
function parameter or result, etc). The only place in core code that
has occasion to reference it is struct CustomPath, but that does

const struct CustomPathMethods *methods;

so it's not actually referencing the typedef. So a persistent fix
for this would have to do something about that. I think under C11
rules it'd be okay for pathnodes.h to duplicate the typedef
declaration:

typedef struct CustomPathMethods CustomPathMethods;
...
const CustomPathMethods *methods;

but I didn't try it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-07-07 14:22:45 Re: postgres_fdw: fix cumulative stats after imported foreign-table stats
Previous Message Xuneng Zhou 2026-07-07 14:08:00 Re: wait_event_type for WAIT FOR LSN