postgresql/contrib/citext
Tom Lane 1007b0a126 Fix hashjoin costing mistake introduced with inner_unique optimization.
In final_cost_hashjoin(), commit 9c7f5229a allowed inner_unique cases
to follow a code path previously used only for SEMI/ANTI joins; but it
neglected to fix an if-test within that path that assumed SEMI and ANTI
were the only possible cases.  This resulted in a wrong value for
hashjointuples, and an ensuing bad cost estimate, for inner_unique normal
joins.  Fortunately, for inner_unique normal joins we can assume the number
of joined tuples is the same as for a SEMI join; so there's no need for
more code, we just have to invert the test to check for ANTI not SEMI.

It turns out that in two contrib tests in which commit 9c7f5229a
changed the plan expected for a query, the change was actually wrong
and induced by this estimation error, not by any real improvement.
Hence this patch also reverts those changes.

Per report from RK Korlapati.  Backpatch to v10 where the error was
introduced.

David Rowley

Discussion: https://postgr.es/m/CA+SNy03bhq0fodsfOkeWDCreNjJVjsdHwUsb7AG=jpe0PtZc_g@mail.gmail.com
2018-07-14 11:59:12 -04:00
..
expected Fix hashjoin costing mistake introduced with inner_unique optimization. 2018-07-14 11:59:12 -04:00
sql Disable multi-byte citext tests 2017-09-19 15:31:37 -04:00
.gitignore
citext--1.0--1.1.sql
citext--1.1--1.2.sql Schema-qualify some references to regprocedure. 2016-06-10 10:41:58 -04:00
citext--1.2--1.3.sql Repair damage done by citext--1.1--1.2.sql. 2016-07-26 15:32:57 -04:00
citext--1.3--1.4.sql Support the new regexp_match() function for citext. 2016-08-18 10:52:31 -04:00
citext--1.4--1.5.sql Add citext_pattern_ops for citext contrib module 2017-09-19 08:31:45 -04:00
citext--1.4.sql Support the new regexp_match() function for citext. 2016-08-18 10:52:31 -04:00
citext--unpackaged--1.0.sql
citext.c Add citext_pattern_ops for citext contrib module 2017-09-19 08:31:45 -04:00
citext.control Distinguish selectivity of < from <= and > from >=. 2017-09-13 11:12:39 -04:00
Makefile Distinguish selectivity of < from <= and > from >=. 2017-09-13 11:12:39 -04:00