From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: allow benign typedef redefinitions (C11) |
Date: | 2025-09-28 16:54:23 |
Message-ID: | 202509281643.jcbwanjuy7yh@alvherre.pgsql |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2025-Sep-28, Tom Lane wrote:
> =?UTF-8?Q?=C3=81lvaro_Herrera?= <alvherre(at)kurilemu(dot)de> writes:
> > The changes to inet.h and varbit.h are surprising, but required.
>
> Why? Those headers compile now, and you've not removed any includes
> that they might indirectly depend on.
That's true.
> If what you mean is that some of the macros in these headers require
> varatt.h to be used, I do not agree that that means we should put
> varatt.h into these headers. We've frequently relied on exactly
> that property of macro definitions to avoid excessive or circular
> inclusions. Moreover, even if we wanted to change that policy,
> I know of no simple way to check it.
We used to have a script called pgdefine that would create a .c file
that would expand all macros defined in a header, and then ensure that
the C file compiled. It was removed only recently (Dec. 2024), in
commit 5af699066f81, though it's true that apparently nobody had used in
a while.
> I think what we're trying to do here is reduce the #includes of
> header files to be just enough to compile the headers themselves.
> That will bleed out into more #include's required in .c files,
> but that's fine by me.
Ok, that requires adding varatt.h to just two .c files -- attached.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Remove-genam.h-s-dependency-on-relcache.h-and-tid.patch | text/x-diff | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Christensen | 2025-09-28 19:18:48 | Re: [PATCH] GROUP BY ALL |
Previous Message | Tom Lane | 2025-09-28 15:41:41 | Re: RFC: extensible planner state |