]> granicus.if.org Git - postgresql/blob - src/include/optimizer/paths.h
pgindent run before 6.3 release, with Thomas' requested changes.
[postgresql] / src / include / optimizer / paths.h
1 /*-------------------------------------------------------------------------
2  *
3  * paths.h--
4  *        prototypes for various files in optimizer/paths (were separate
5  *        header files
6  *
7  *
8  * Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: paths.h,v 1.8 1998/02/26 04:42:17 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PATHS_H
15 #define PATHS_H
16
17 #include "nodes/nodes.h"
18 #include "nodes/parsenodes.h"
19 #include "nodes/relation.h"
20
21 /*
22  * allpaths.h
23  */
24 extern List *find_paths(Query *root, List *rels);
25
26 /*
27  * indxpath.h
28  *        routines to generate index paths
29  */
30 extern List *
31 find_index_paths(Query *root, Rel *rel, List *indices,
32                                  List *clauseinfo_list,
33                                  List *joininfo_list);
34
35 /*
36  * joinpath.h
37  *         routines to create join paths
38  */
39 extern void find_all_join_paths(Query *root, List *joinrels);
40
41
42 /*
43  * orindxpath.h
44  */
45 extern List *create_or_index_paths(Query *root, Rel *rel, List *clauses);
46
47 /*
48  * hashutils.h
49  *        routines to deal with hash keys and clauses
50  */
51 extern List *
52 group_clauses_by_hashop(List *clauseinfo_list,
53                                                 int inner_relid);
54
55 /*
56  * joinutils.h
57  *        generic join method key/clause routines
58  */
59 extern List *
60 match_pathkeys_joinkeys(List *pathkeys,
61                                          List *joinkeys, List *joinclauses, int which_subkey,
62                                                 List **matchedJoinClausesPtr);
63 extern List *
64 extract_path_keys(List *joinkeys, List *tlist,
65                                   int which_subkey);
66 extern Path *
67 match_paths_joinkeys(List *joinkeys, PathOrder *ordering,
68                                          List *paths, int which_subkey);
69 extern List *
70 new_join_pathkeys(List *outer_pathkeys,
71                                   List *join_rel_tlist, List *joinclauses);
72
73 /*
74  * mergeutils.h
75  *        routines to deal with merge keys and clauses
76  */
77 extern List *
78 group_clauses_by_order(List *clauseinfo_list,
79                                            int inner_relid);
80 extern MInfo *
81 match_order_mergeinfo(PathOrder *ordering,
82                                           List *mergeinfo_list);
83
84 /*
85  * joinrels.h
86  *        routines to determine which relations to join
87  */
88 extern List *find_join_rels(Query *root, List *outer_rels);
89 extern void add_new_joininfos(Query *root, List *joinrels, List *outerrels);
90 extern List *final_join_rels(List *join_rel_list);
91
92 /*
93  * prototypes for path/prune.c
94  */
95 extern void prune_joinrels(List *rel_list);
96 extern void prune_rel_paths(List *rel_list);
97 extern Path *prune_rel_path(Rel *rel, Path *unorderedpath);
98 extern List *merge_joinrels(List *rel_list1, List *rel_list2);
99 extern List *prune_oldrels(List *old_rels);
100
101 #endif                                                  /* PATHS_H */