diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-02-06 23:43:24 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-02-06 23:43:24 +0000 |
commit | c473d923515e03fe5fd43c2ca15d52363a93f488 (patch) | |
tree | ca1de3f8f20beb73fbd244f9f24e0e1fd7a3ca22 /src/backend/optimizer/prep/prepunion.c | |
parent | c87c31f10bfd77234b62175f03b9ae8a6f961411 (diff) |
Fix cost_mergejoin's failure to adjust for rescanning of non-unique merge join
keys when considering a semi or anti join. This requires estimating the
selectivity of the merge qual as though it were a regular inner join condition.
To allow caching both that and the real outer-join-aware selectivity, split
RestrictInfo.this_selec into two fields.
This fixes one of the problems reported by Kevin Grittner.
Diffstat (limited to 'src/backend/optimizer/prep/prepunion.c')
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 1ef4532e5e1..b9ce6d2ed0c 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -22,7 +22,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.164 2009/01/01 17:23:44 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.165 2009/02/06 23:43:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1662,7 +1662,8 @@ adjust_appendrel_attrs_mutator(Node *node, AppendRelInfo *context) * different values when considering the child relation. */ newinfo->eval_cost.startup = -1; - newinfo->this_selec = -1; + newinfo->norm_selec = -1; + newinfo->outer_selec = -1; newinfo->left_ec = NULL; newinfo->right_ec = NULL; newinfo->left_em = NULL; |