Re: allow benign typedef redefinitions (C11) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: allow benign typedef redefinitions (C11)
Date
Msg-id 13b35b2f-44cb-4fb6-bd2c-f260a1e5f009@eisentraut.org
Whole thread Raw
In response to Re: allow benign typedef redefinitions (C11)  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On 19.09.25 12:52, Álvaro Herrera wrote:
> Here's a few more forward struct declarations turned into typedefs, for
> cleanliness sake.

Two comments; the rest looks okay to me.

* src/include/access/heapam.h

You are removing the declaration of struct TupleTableSlot and then go
on to use just TupleTableSlot; apparently that works, but that creates
an implicit dependency on typedef TupleTableSlot from somewhere else.
It might be better to change the existing struct TupleTableSlot
declaration into a typedef and keep it.

* src/include/nodes/execnodes.h

In this file, you are changing several times struct ScanKeyData to
just ScanKeyData, but there is no typedef of ScanKeyData in this file.
The struct ScanKeyData can exist by itself (it becomes declared as
soon as you use it), but the typedef needs to come from somewhere.  So
this change introduces a new dependency between this header and some
other header that provides that typedef.  I suggest you fix that by
adding a typedef in this file.




pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Add support for specifying tables in pg_createsubscriber.
Next
From: Chao Li
Date:
Subject: Show json field name instead of ?column?