postgresql/src/test/regress
Tom Lane e83bb10d6d Adjust definition of cheapest_total_path to work better with LATERAL.
In the initial cut at LATERAL, I kept the rule that cheapest_total_path
was always unparameterized, which meant it had to be NULL if the relation
has no unparameterized paths.  It turns out to work much more nicely if
we always have *some* path nominated as cheapest-total for each relation.
In particular, let's still say it's the cheapest unparameterized path if
there is one; if not, take the cheapest-total-cost path among those of
the minimum available parameterization.  (The first rule is actually
a special case of the second.)

This allows reversion of some temporary lobotomizations I'd put in place.
In particular, the planner can now consider hash and merge joins for
joins below a parameter-supplying nestloop, even if there aren't any
unparameterized paths available.  This should bring planning of
LATERAL-containing queries to the same level as queries not using that
feature.

Along the way, simplify management of parameterized paths in add_path()
and friends.  In the original coding for parameterized paths in 9.2,
I tried to minimize the logic changes in add_path(), so it just treated
parameterization as yet another dimension of comparison for paths.
We later made it ignore pathkeys (sort ordering) of parameterized paths,
on the grounds that ordering isn't a useful property for the path on the
inside of a nestloop, so we might as well get rid of useless parameterized
paths as quickly as possible.  But we didn't take that reasoning as far as
we should have.  Startup cost isn't a useful property inside a nestloop
either, so add_path() ought to discount startup cost of parameterized paths
as well.  Having done that, the secondary sorting I'd implemented (in
add_parameterized_path) is no longer needed --- any parameterized path that
survives add_path() at all is worth considering at higher levels.  So this
should be a bit faster as well as simpler.
2012-08-29 22:06:07 -04:00
..
data Fix GIN to support null keys, empty and null items, and full index scans. 2011-01-07 19:16:24 -05:00
expected Adjust definition of cheapest_total_path to work better with LATERAL. 2012-08-29 22:06:07 -04:00
input Change syntax of new CHECK NO INHERIT constraints 2012-07-24 16:01:32 -04:00
output Add SP-GiST support for range types. 2012-08-16 14:30:45 +03:00
sql Fix up planner infrastructure to support LATERAL properly. 2012-08-26 22:50:23 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
GNUmakefile pg_regress: Use target-specific variable instead of overriding make rule 2012-02-07 22:42:19 +02:00
Makefile Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
parallel_schedule Syntax support and documentation for event triggers. 2012-07-18 10:16:16 -04:00
pg_regress_main.c pg_regress: Replace exit_nicely() with exit() plus atexit() hook 2012-01-02 22:09:25 +02:00
pg_regress.c Use --nosync during make check's initdb call. 2012-07-21 19:56:22 -04:00
pg_regress.h pg_regress: Replace exit_nicely() with exit() plus atexit() hook 2012-01-02 22:09:25 +02:00
regress.c Redesign the plancache mechanism for more flexibility and efficiency. 2011-09-16 00:43:52 -04:00
regressplans.sh
resultmap Enable compiling with the mingw-w64 32 bit compiler. 2011-12-10 15:35:41 -05:00
serial_schedule Syntax support and documentation for event triggers. 2012-07-18 10:16:16 -04:00
standby_schedule Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00