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/nodes/outfuncs.c | |
parent | c87c31f10bfd77234b62175f03b9ae8a6f961411 (diff) | |
download | postgresql-c473d923515e03fe5fd43c2ca15d52363a93f488.tar.gz postgresql-c473d923515e03fe5fd43c2ca15d52363a93f488.zip |
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/nodes/outfuncs.c')
-rw-r--r-- | src/backend/nodes/outfuncs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 74df2f30616..5dc9db98bf9 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.351 2009/02/02 19:31:39 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.352 2009/02/06 23:43:23 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -1609,7 +1609,8 @@ _outRestrictInfo(StringInfo str, RestrictInfo *node) WRITE_BITMAPSET_FIELD(right_relids); WRITE_NODE_FIELD(orclause); /* don't write parent_ec, leads to infinite recursion in plan tree dump */ - WRITE_FLOAT_FIELD(this_selec, "%.4f"); + WRITE_FLOAT_FIELD(norm_selec, "%.4f"); + WRITE_FLOAT_FIELD(outer_selec, "%.4f"); WRITE_NODE_FIELD(mergeopfamilies); /* don't write left_ec, leads to infinite recursion in plan tree dump */ /* don't write right_ec, leads to infinite recursion in plan tree dump */ |