postgresql/src/include/nodes
Tom Lane 4914b70847 Fix an oversight in the code that makes transitive-equality deductions from
outer join clauses.  Given, say,
	... from a left join b on a.a1 = b.b1 where a.a1 = 42;
we'll deduce a clause b.b1 = 42 and then mark the original join clause
redundant (we can't remove it completely for reasons I don't feel like
squeezing into this log entry).  However the original implementation of
that wasn't bulletproof, because clause_selectivity() wouldn't honor
this_selec if given nonzero varRelid --- which in practice meant that
it worked as desired *except* when considering index scan quals.  Which
resulted in bogus underestimation of the size of the indexscan result for
an inner indexscan in an outer join, and consequently a possibly bad
choice of indexscan vs. bitmap scan.  Fix by introducing an explicit test
into clause_selectivity().  Also, to make sure we don't trigger that test
in corner cases, change the convention to be that this_selec > 1, not
this_selec = 1, means it's been marked redundant.  Per trouble report from
Scara Maccai.

Back-patch to 8.2, where the problem was introduced.
2008-12-01 21:06:31 +00:00
..
bitmapset.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
execnodes.h Fix dynahash.c to suppress hash bucket splits while a hash_seq_search() scan 2007-04-26 23:24:57 +00:00
makefuncs.h Fix all known problems with pg_dump's handling of serial sequences 2006-08-21 00:57:26 +00:00
memnodes.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeFuncs.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodes.h Fix IS NULL and IS NOT NULL tests on row-valued expressions to conform to 2006-09-28 20:51:43 +00:00
params.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
parsenodes.h Fix recently-understood problems with handling of XID freezing, particularly 2006-11-05 22:42:10 +00:00
pg_list.h Move xact.c's partial support for Lists of TransactionIds into pg_list.h. 2006-08-27 19:11:46 +00:00
plannodes.h Add support for multi-row VALUES clauses as part of INSERT statements 2006-08-02 01:59:48 +00:00
primnodes.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
print.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
readfuncs.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
relation.h Fix an oversight in the code that makes transitive-equality deductions from 2008-12-01 21:06:31 +00:00
tidbitmap.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
value.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00