mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Create a function variable "join_search_hook" to let plugins override the
join search order portion of the planner; this is specifically intended to simplify developing a replacement for GEQO planning. Patch by Julius Stroffek, editorialized on by me. I renamed make_one_rel_by_joins to standard_join_search and make_rels_by_joins to join_search_one_level to better reflect their place within this scheme.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.98 2007/05/22 01:40:33 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.99 2007/09/26 18:51:51 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -23,7 +23,16 @@
|
||||
extern bool enable_geqo;
|
||||
extern int geqo_threshold;
|
||||
|
||||
/* Hook for plugins to replace standard_join_search() */
|
||||
typedef RelOptInfo * (*join_search_hook_type) (PlannerInfo *root,
|
||||
int levels_needed,
|
||||
List *initial_rels);
|
||||
extern PGDLLIMPORT join_search_hook_type join_search_hook;
|
||||
|
||||
|
||||
extern RelOptInfo *make_one_rel(PlannerInfo *root, List *joinlist);
|
||||
extern RelOptInfo *standard_join_search(PlannerInfo *root, int levels_needed,
|
||||
List *initial_rels);
|
||||
|
||||
#ifdef OPTIMIZER_DEBUG
|
||||
extern void debug_print_rel(PlannerInfo *root, RelOptInfo *rel);
|
||||
@@ -89,7 +98,8 @@ extern void add_paths_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel,
|
||||
* joinrels.c
|
||||
* routines to determine which relations to join
|
||||
*/
|
||||
extern List *make_rels_by_joins(PlannerInfo *root, int level, List **joinrels);
|
||||
extern List *join_search_one_level(PlannerInfo *root, int level,
|
||||
List **joinrels);
|
||||
extern RelOptInfo *make_join_rel(PlannerInfo *root,
|
||||
RelOptInfo *rel1, RelOptInfo *rel2);
|
||||
extern bool have_join_order_restriction(PlannerInfo *root,
|
||||
|
||||
Reference in New Issue
Block a user