postgresql/src
Tom Lane 3ced8837db Simplify query_planner's API by having it return the top-level RelOptInfo.
Formerly, query_planner returned one or possibly two Paths for the topmost
join relation, so that grouping_planner didn't see the join RelOptInfo
(at least not directly; it didn't have any hesitation about examining
cheapest_path->parent, though).  However, correct selection of the Paths
involved a significant amount of coupling between query_planner and
grouping_planner, a problem which has gotten worse over time.  It seems
best to give up on this API choice and instead return the topmost
RelOptInfo explicitly.  Then grouping_planner can pull out the Paths it
wants from the rel's path list.  In this way we can remove all knowledge
of grouping behaviors from query_planner.

The only real benefit of the old way is that in the case of an empty
FROM clause, we never made any RelOptInfos at all, just a Path.  Now
we have to gin up a dummy RelOptInfo to represent the empty FROM clause.
That's not a very big deal though.

While at it, simplify query_planner's API a bit more by having the caller
set up root->tuple_fraction and root->limit_tuples, rather than passing
those values as separate parameters.  Since query_planner no longer does
anything with either value, requiring it to fill the PlannerInfo fields
seemed pretty arbitrary.

This patch just rearranges code; it doesn't (intentionally) change any
behaviors.  Followup patches will do more interesting things.
2013-08-05 15:01:09 -04:00
..
backend Simplify query_planner's API by having it return the top-level RelOptInfo. 2013-08-05 15:01:09 -04:00
bin pg_dump/pg_dumpall: remove unnecessary SQL trailing semicolons 2013-07-31 11:37:17 -04:00
common pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
include Simplify query_planner's API by having it return the top-level RelOptInfo. 2013-08-05 15:01:09 -04:00
interfaces Improve handling of pthread_mutex_lock error case 2013-08-01 15:42:07 -04:00
makefiles Install all a Makefile's extension controls, not just the first. 2013-07-03 19:03:31 -04:00
pl Allow a context to be passed in for error handling 2013-08-01 01:07:20 -04:00
port Send SIGKILL to children if they don't die quickly in immediate shutdown 2013-06-28 17:49:46 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Fix crash in error report of invalid tuple lock 2013-08-02 13:18:37 -04:00
timezone pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
tools Get rid of pg_class.reltoastidxid. 2013-07-04 03:24:09 +09:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Improve support for building PGXS modules with VPATH. 2013-07-01 12:53:05 -04:00
Makefile.shlib Add pkg-config files for libpq and ecpg libraries 2013-03-31 16:58:40 -04:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00