1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* paths.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* prototypes for various files in optimizer/paths (were separate
|
|
|
|
* header files
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1999-02-14 05:57:02 +01:00
|
|
|
* $Id: paths.h,v 1.16 1999/02/14 04:56:55 momjian Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef PATHS_H
|
|
|
|
#define PATHS_H
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-11-26 02:14:33 +01:00
|
|
|
#include "nodes/nodes.h"
|
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
#include "nodes/relation.h"
|
|
|
|
|
1996-07-09 08:22:35 +02:00
|
|
|
/*
|
|
|
|
* allpaths.h
|
|
|
|
*/
|
1997-09-08 23:56:23 +02:00
|
|
|
extern List *find_paths(Query *root, List *rels);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* indxpath.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to generate index paths
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-10 22:02:50 +01:00
|
|
|
extern List *find_index_paths(Query *root, RelOptInfo *rel, List *indices,
|
1999-02-03 21:15:53 +01:00
|
|
|
List *restrictinfo_list,
|
1997-09-08 23:56:23 +02:00
|
|
|
List *joininfo_list);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* joinpath.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to create join paths
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-14 05:57:02 +01:00
|
|
|
extern void update_rels_pathlist_for_joins(Query *root, List *joinrels);
|
1997-09-07 07:04:48 +02:00
|
|
|
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* orindxpath.h
|
|
|
|
*/
|
1999-02-10 22:02:50 +01:00
|
|
|
extern List *create_or_index_paths(Query *root, RelOptInfo *rel, List *clauses);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* hashutils.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to deal with hash keys and clauses
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-03 21:15:53 +01:00
|
|
|
extern List *group_clauses_by_hashop(List *restrictinfo_list,
|
1997-09-07 07:04:48 +02:00
|
|
|
int inner_relid);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* joinutils.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* generic join method key/clause routines
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1998-09-01 06:40:42 +02:00
|
|
|
extern List *match_pathkeys_joinkeys(List *pathkeys,
|
1997-09-08 23:56:23 +02:00
|
|
|
List *joinkeys, List *joinclauses, int which_subkey,
|
|
|
|
List **matchedJoinClausesPtr);
|
1998-09-01 06:40:42 +02:00
|
|
|
extern List *extract_path_keys(List *joinkeys, List *tlist,
|
1997-09-07 07:04:48 +02:00
|
|
|
int which_subkey);
|
1998-09-01 06:40:42 +02:00
|
|
|
extern Path *match_paths_joinkeys(List *joinkeys, PathOrder *ordering,
|
1997-09-08 23:56:23 +02:00
|
|
|
List *paths, int which_subkey);
|
1998-09-01 06:40:42 +02:00
|
|
|
extern List *new_join_pathkeys(List *outer_pathkeys,
|
1997-09-08 23:56:23 +02:00
|
|
|
List *join_rel_tlist, List *joinclauses);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* mergeutils.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to deal with merge keys and clauses
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-03 21:15:53 +01:00
|
|
|
extern List *group_clauses_by_order(List *restrictinfo_list,
|
1997-09-07 07:04:48 +02:00
|
|
|
int inner_relid);
|
1999-02-04 04:19:11 +01:00
|
|
|
extern MergeInfo *match_order_mergeinfo(PathOrder *ordering,
|
1997-09-08 23:56:23 +02:00
|
|
|
List *mergeinfo_list);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* joinrels.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to determine which relations to join
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-14 05:57:02 +01:00
|
|
|
extern List *make_new_rels_by_joins(Query *root, List *outer_rels);
|
1997-09-08 23:56:23 +02:00
|
|
|
extern void add_new_joininfos(Query *root, List *joinrels, List *outerrels);
|
|
|
|
extern List *final_join_rels(List *join_rel_list);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* prototypes for path/prune.c
|
|
|
|
*/
|
1999-02-14 05:57:02 +01:00
|
|
|
extern void merge_rels_with_same_relids(List *rel_list);
|
1999-02-12 06:57:08 +01:00
|
|
|
extern void rels_set_cheapest(List *rel_list);
|
1997-09-08 23:56:23 +02:00
|
|
|
extern List *merge_joinrels(List *rel_list1, List *rel_list2);
|
|
|
|
extern List *prune_oldrels(List *old_rels);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* PATHS_H */
|