some more include removal from headers - Mailing list pgsql-hackers

From Álvaro Herrera
Subject some more include removal from headers
Date
Msg-id 202603131240.ihwqdxnj7w2o@alvherre.pgsql
Whole thread Raw
Responses Re: some more include removal from headers
List pgsql-hackers
Hello,

execnodes.h is a very large source of other headers for no very good
reasons anymore.  Fortunately there's a few of the files it includes
that we can remove very easily with just a small number of additional
typedefs.  Some proposed patches attached; it's all very
straightforward, just add typedefs for structs
  Tuplesortstate
  Tuplestorestate
  TupleConversionMap
  TupleTableSlot
  TupleTableSlotOps
  TIDBitmap
This also requires to add some headers to a bunch of .c files, which is
a good indicator that we're making progress.

It's especially nice when the new #include line we have to add in some
.c file is not the one that was removed from the .h file -- for instance
in 0001 we have to add pg_type_d.h when removing tuplestore.h/
tuplesort.h, and if you look at the chart here
https://doxygen.postgresql.org/tuplesort_8h.html it becomes very clear
we're saving quite a lot of useless indirect inclusions.  (This is also
seen in 0004: we remove tuptable.h and have to add sysattr.h to three .c
files).


-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"You don't solve a bad join with SELECT DISTINCT" #CupsOfFail
https://twitter.com/connor_mc_d/status/1431240081726115845

Attachment

pgsql-hackers by date:

Previous
From: Alena Rybakina
Date:
Subject: Re: Vacuum statistics
Next
From: Heikki Linnakangas
Date:
Subject: Re: Add a check for interrupts in ginInsert