further #include cleanup (IWYU)

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-10-20T07:50:00Z
Lists: pgsql-hackers

Attachments

This is a continuation of [0] ("backend *.c #include cleanup (IWYU)"), 
which removed a bunch of unneeded #include's, found by the 
include-what-you-use (IWYU) tool.  I went through the rest of the code 
and did similar cleanups.  The patches are organized by code area, but 
they are otherwise not separate.  The first patch ("Remove unused 
#include's from backend .c files") is mostly stuff that is new since 
[0].  The remaining patches deal with code that wasn't touched by [0], 
so a lot of the changes have similar patterns as [0].


[0]: 
https://www.postgresql.org/message-id/flat/af837490-6b2f-46df-ba05-37ea6a6653fc%40eisentraut.org

Commits

  1. Remove unused #include's from bin .c files

  2. Remove unused #include's from contrib, pl, test .c files

  3. Remove unused #include's from backend .c files

  4. Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.