pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Clean up some misplaced #includes.
2+ messages / 2 participants
[nested] [flat]

* pgsql: Clean up some misplaced #includes.
@ 2016-03-18 17:43 Tom Lane <tgl@sss.pgh.pa.us>
  2016-03-18 18:47 ` Re: pgsql: Clean up some misplaced #includes. Aleksander Alekseev <a.alekseev@postgrespro.ru>
  0 siblings, 1 reply; 2+ messages in thread

From: Tom Lane @ 2016-03-18 17:43 UTC (permalink / raw)
  To: pgsql-committers

Clean up some misplaced #includes.

Random .h files have no business including postgres-fe.h (or postgres.h).
If that wasn't the first #include done by the calling .c file, it's the
.c file that's broken.  Noted while prepping Kyotaro Horiguchi's psql
lexer refactoring patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3422fecccadb021b7b4cdbc73b2c29f66f031761

Modified Files
--------------
src/bin/psql/common.h       | 3 +--
src/bin/psql/create_help.pl | 2 +-
src/bin/psql/mainloop.h     | 4 +---
3 files changed, 3 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* Re: pgsql: Clean up some misplaced #includes.
  2016-03-18 17:43 pgsql: Clean up some misplaced #includes. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-03-18 18:47 ` Aleksander Alekseev <a.alekseev@postgrespro.ru>
  0 siblings, 0 replies; 2+ messages in thread

From: Aleksander Alekseev @ 2016-03-18 18:47 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers

> Clean up some misplaced #includes.

In case you are interested here is a patch that fixes some unused
imports I managed to find.

-- 
Best regards,
Aleksander Alekseev
http://eax.me/

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Attachments:

unused-imports.diff (text/x-patch, 2.0K) download diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index f70bb49..ceeb045 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -32,8 +32,6 @@ #include "access/twophase.h" #include "access/xact.h" #include "access/xlog_internal.h" -#include "access/xloginsert.h" -#include "access/xlogreader.h" #include "access/xlogutils.h" #include "catalog/catversion.h" #include "catalog/pg_control.h" @@ -46,31 +44,19 @@ #include "postmaster/startup.h" #include "replication/basebackup.h" #include "replication/logical.h" -#include "replication/slot.h" -#include "replication/origin.h" #include "replication/snapbuild.h" #include "replication/walreceiver.h" #include "replication/walsender.h" -#include "storage/barrier.h" -#include "storage/bufmgr.h" -#include "storage/fd.h" #include "storage/ipc.h" #include "storage/large_object.h" -#include "storage/latch.h" #include "storage/pmsignal.h" #include "storage/predicate.h" -#include "storage/proc.h" #include "storage/procarray.h" #include "storage/reinit.h" #include "storage/smgr.h" -#include "storage/spin.h" #include "utils/builtins.h" -#include "utils/guc.h" -#include "utils/memutils.h" #include "utils/ps_status.h" #include "utils/relmapper.h" -#include "utils/snapmgr.h" -#include "utils/timestamp.h" #include "pg_trace.h" extern uint32 bootstrap_data_checksum_version; diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index e7826a4..d3fc910 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -16,12 +16,9 @@ #include "postgres.h" -#include <float.h> -#include <math.h> #include <signal.h> #include "access/htup_details.h" -#include "access/transam.h" #include "access/tuptoaster.h" #include "access/xact.h" #include "catalog/pg_type.h" @@ -30,7 +27,6 @@ #include "executor/executor.h" #include "executor/spi.h" #include "miscadmin.h" -#include "port/atomics.h" #include "utils/builtins.h" #include "utils/geo_decls.h" #include "utils/rel.h"
^ permalink raw reply [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-03-18 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 17:43 pgsql: Clean up some misplaced #includes. Tom Lane <tgl@sss.pgh.pa.us>
2016-03-18 18:47 ` Aleksander Alekseev <a.alekseev@postgrespro.ru>

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