From: | "Tristan Partin" <tristan(at)neon(dot)tech> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add missing includes |
Date: | 2023-05-22 15:32:36 |
Message-ID: | CSSWYPFJ0UEM.3XKRELC7ZICS@c3po |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon May 22, 2023 at 10:28 AM CDT, Tom Lane wrote:
> >> Some files were missing information from the c.h header.
>
> > Actually, these omissions are intentional, and we have bespoke handling
> > for this in our own header-checking scripts (src/tools/pginclude). I
> > imagine this is documented somewhere, but ATM I can't remember where.
> > (And if not, maybe that's something we should do.)
>
> Yeah, the general policy is that .h files should not explicitly include
> c.h (nor postgres.h nor postgres_fe.h). Instead, .c files should include
> the appropriate one of those three files first. This allows sharing of
> .h files more easily across frontend/backend/common environments.
>
> I'm not sure where this is documented either.
Thanks for the added context. I'll try to keep this in mind going
forward.
--
Tristan Partin
Neon (https://neon.tech)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-05-22 15:34:14 | Re: Add missing includes |
Previous Message | Tom Lane | 2023-05-22 15:28:19 | Re: Add missing includes |