summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
authorMichael P2011-03-11 05:36:32 +0000
committerPavan Deolasee2011-05-24 09:42:01 +0000
commit05384c6a05e81cbacfde52605672a2d87acbcd6a (patch)
tree0578b4d0d790a85bfa4ff7316ea705886564606f /src/backend/optimizer
parente4e773b5a1b5f731f293c3b8a481df18829ce27f (diff)
Stabilize code for pg_regress tests
This commits enables FOREIGN constraints and solves a couple of issues found with pg_regress tests when assertions are enabled.
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/plan/subselect.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c
index 7736c094f5..8af94465e3 100644
--- a/src/backend/optimizer/plan/subselect.c
+++ b/src/backend/optimizer/plan/subselect.c
@@ -32,7 +32,9 @@
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
-
+#ifdef PGXC
+#include "pgxc/pgxc.h"
+#endif
typedef struct convert_testexpr_context
{
@@ -342,6 +344,11 @@ make_subplan(PlannerInfo *root, Query *orig_subquery, SubLinkType subLinkType,
result = build_subplan(root, plan,
subroot->parse->rtable, subroot->rowMarks,
subLinkType, testexpr, true, isTopQual);
+#ifdef PGXC
+ /* This is not necessary for a PGXC Coordinator, we just need one plan */
+ if (IS_PGXC_COORDINATOR && !IsConnFromCoord())
+ return result;
+#endif
/*
* If it's a correlated EXISTS with an unimportant targetlist, we might be