summaryrefslogtreecommitdiff
path: root/src/include/optimizer/paths.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/optimizer/paths.h')
-rw-r--r--src/include/optimizer/paths.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h
index 94779eff9a..f4ff3e98d1 100644
--- a/src/include/optimizer/paths.h
+++ b/src/include/optimizer/paths.h
@@ -25,19 +25,30 @@
* mask is computed on the basis of the various enable_* GUCs, and can be
* overriden by hooks.
*
- * We have five main join strategie: a foreign join (when supported by the
+ * We have five main join strategies: a foreign join (when supported by the
* relevant FDW), a merge join, a nested loop, a hash join, and a partitionwise
- * join. Nested loops are further subdivided depending on whether the inner
- * side of the join is materialized, memoized, or neither (which we here call
- * a "plain" nested loop).
+ * join. Merge joins are further subdivided based on whether the inner side
+ * is materialized, and nested loops are further subdivided based on whether
+ * the inner side is materialized, memoized, or neither. "Plain" means a
+ * strategy where neither materialization nor memoization is used.
+ *
+ * If you don't care whether materialization or memoization is used, set all
+ * the bits for the relevant major join strategy. If you do care, just set the
+ * subset of bits that correspond to the cases you want to allow.
*/
#define JSA_FOREIGN 0x0001
-#define JSA_MERGEJOIN 0x0002
-#define JSA_NESTLOOP_PLAIN 0x0004
-#define JSA_NESTLOOP_MATERIALIZE 0x0008
-#define JSA_NESTLOOP_MEMOIZE 0x0010
-#define JSA_HASHJOIN 0x0020
-#define JSA_PARTITIONWISE 0x0040
+#define JSA_MERGEJOIN_PLAIN 0x0002
+#define JSA_MERGEJOIN_MATERIALIZE 0x0004
+#define JSA_NESTLOOP_PLAIN 0x0008
+#define JSA_NESTLOOP_MATERIALIZE 0x0010
+#define JSA_NESTLOOP_MEMOIZE 0x0020
+#define JSA_HASHJOIN 0x0040
+#define JSA_PARTITIONWISE 0x0080
+
+#define JSA_MERGEJOIN_ANY \
+ (JSA_MERGEJOIN_PLAIN | JSA_MERGEJOIN_MATERIALIZE)
+#define JSA_NESTLOOP_ANY \
+ (JSA_NESTLOOP_PLAIN | JSA_NESTLOOP_MATERIALIZE | JSA_NESTLOOP_MEMOIZE)
/*
* allpaths.c