From 7b464015577e6e7544a7aacf19ca55b271e740ac Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 30 Dec 2010 22:12:40 -0500 Subject: [PATCH] Move symbols for ExecMergeJoin's state machine into nodeMergejoin.c. There's no reason for these values to be known anywhere else. After doing this, executor/execdefs.h is vestigial and can be removed. --- src/backend/executor/nodeMergejoin.c | 16 +++++++++++++- src/include/executor/execdefs.h | 33 ---------------------------- src/include/nodes/execnodes.h | 2 +- 3 files changed, 16 insertions(+), 35 deletions(-) delete mode 100644 src/include/executor/execdefs.h diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 98d1615514..a6c0cc786e 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -95,7 +95,6 @@ #include "access/nbtree.h" #include "catalog/pg_amop.h" #include "executor/execdebug.h" -#include "executor/execdefs.h" #include "executor/nodeMergejoin.h" #include "miscadmin.h" #include "utils/acl.h" @@ -104,6 +103,21 @@ #include "utils/syscache.h" +/* + * States of the ExecMergeJoin state machine + */ +#define EXEC_MJ_INITIALIZE_OUTER 1 +#define EXEC_MJ_INITIALIZE_INNER 2 +#define EXEC_MJ_JOINTUPLES 3 +#define EXEC_MJ_NEXTOUTER 4 +#define EXEC_MJ_TESTOUTER 5 +#define EXEC_MJ_NEXTINNER 6 +#define EXEC_MJ_SKIP_TEST 7 +#define EXEC_MJ_SKIPOUTER_ADVANCE 8 +#define EXEC_MJ_SKIPINNER_ADVANCE 9 +#define EXEC_MJ_ENDOUTER 10 +#define EXEC_MJ_ENDINNER 11 + /* * Runtime data for each mergejoin clause */ diff --git a/src/include/executor/execdefs.h b/src/include/executor/execdefs.h deleted file mode 100644 index 36417815ee..0000000000 --- a/src/include/executor/execdefs.h +++ /dev/null @@ -1,33 +0,0 @@ -/*------------------------------------------------------------------------- - * - * execdefs.h - * - * - * - * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * src/include/executor/execdefs.h - * - *------------------------------------------------------------------------- - */ -#ifndef EXECDEFS_H -#define EXECDEFS_H - -/* ---------------- - * Merge Join states - * ---------------- - */ -#define EXEC_MJ_INITIALIZE_OUTER 1 -#define EXEC_MJ_INITIALIZE_INNER 2 -#define EXEC_MJ_JOINTUPLES 3 -#define EXEC_MJ_NEXTOUTER 4 -#define EXEC_MJ_TESTOUTER 5 -#define EXEC_MJ_NEXTINNER 6 -#define EXEC_MJ_SKIP_TEST 7 -#define EXEC_MJ_SKIPOUTER_ADVANCE 8 -#define EXEC_MJ_SKIPINNER_ADVANCE 9 -#define EXEC_MJ_ENDOUTER 10 -#define EXEC_MJ_ENDINNER 11 - -#endif /* EXECDEFS_H */ diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 6af4bb8d76..2b53307ded 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -1425,7 +1425,7 @@ typedef struct NestLoopState * * NumClauses number of mergejoinable join clauses * Clauses info for each mergejoinable clause - * JoinState current "state" of join. see execdefs.h + * JoinState current state of ExecMergeJoin state machine * ExtraMarks true to issue extra Mark operations on inner scan * ConstFalseJoin true if we have a constant-false joinqual * FillOuter true if should emit unjoined outer tuples anyway -- 2.40.0