Unused header file inclusion

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-31T05:49:08Z
Lists: pgsql-hackers

Attachments

Hi,

I noticed that there are many header files being
included which need not be included.
I have tried this in a few files and found the
compilation and regression to be working.
I have attached the patch for the files that
I tried.
I tried this in CentOS, I did not find the header
files to be platform specific.
Should we pursue this further and cleanup in
all the files?

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com

Commits

  1. Add fmgr.h include to selfuncs.h.

  2. Add "headerscheck" script to test header-file compilability under C.

  3. Fix failure-to-compile-standalone in scripts_parallel.h.

  4. Remove fmgr.h includes from headers that don't really need it.

  5. Don't include utils/array.h from acl.h.

  6. Remove redundant prototypes for SQL callable functions.

  7. Remove unnecessary #include <limits.h>

  8. Teach tuplesort.c about "top N" sorting, in which only the first N tuples