pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Don't use double-quotes in #include's of system headers.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Don't use double-quotes in #include's of system headers.
@ 2025-04-27 00:30  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2025-04-27 00:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't use double-quotes in #include's of system headers.

While few if any C compilers will complain about this, it's
inconsistent with our other #include's of the same headers.

There are some other questionable usages in
src/include/jit/SectionMemoryManager.h and
src/pl/plperl/plperl_system.h, but perhaps those have a
reason to be like that.  I can't see that these do.

Noticed while fooling around with a script to do analysis
of our header cross-inclusions.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e8ca9ed1d260e214f02f7f5464f125fe86e55597

Modified Files
--------------
src/include/storage/pmsignal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Don't use double-quotes in #include's of system headers, redux.
@ 2025-04-27 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2025-04-27 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't use double-quotes in #include's of system headers, redux.

This cleans up some loose ends left by commit e8ca9ed1d.  I hadn't
looked closely enough at these places before, but now I have.

The use of double-quoted #includes for Perl headers in plperl_system.h
seems to be simply a mistake introduced in 6c944bf3c and faithfully
copied forward since then.  (I had thought possibly it was required
by some weird Windows build setup, but there's no evidence of that in
our history.)

The occurrences in SectionMemoryManager.h and SectionMemoryManager.cpp
evidently stem from those files' origin as LLVM code.  It's
understandable that LLVM would treat their own files as needing
double-quoted #includes; but they're still system headers to us.

I also applied the same check to *.c files, and found a few other
random incorrect usages in both directions.

Our ECPG headers and test files routinely use angle brackets to refer
to ECPG headers.  I left those usages alone, since it seems reasonable
for an ECPG user to regard those headers as system headers.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/94b84a60729e15ee071739c3aec7fdd781123aab

Modified Files
--------------
src/backend/jit/llvm/SectionMemoryManager.cpp | 4 ++--
src/backend/storage/buffer/bufmgr.c           | 4 ++--
src/bin/initdb/initdb.c                       | 2 +-
src/bin/pg_dump/compress_gzip.c               | 2 +-
src/bin/pg_verifybackup/pg_verifybackup.c     | 2 +-
src/include/jit/SectionMemoryManager.h        | 8 ++++----
src/pl/plperl/plperl_system.h                 | 6 +++---
7 files changed, 14 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-04-27 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-27 00:30 pgsql: Don't use double-quotes in #include's of system headers. Tom Lane <tgl@sss.pgh.pa.us>
2025-04-27 17:23 pgsql: Don't use double-quotes in #include's of system headers, redux. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox