]> granicus.if.org Git - postgresql/blob - src/include/optimizer/pathnode.h
b1353cc971cfab95a4f2ec1d330c847dcf22f3c3
[postgresql] / src / include / optimizer / pathnode.h
1 /*-------------------------------------------------------------------------
2  *
3  * pathnode.h--
4  *    prototypes for pathnode.c, indexnode.c, relnode.c.
5  *
6  *
7  * Copyright (c) 1994, Regents of the University of California
8  *
9  * $Id: pathnode.h,v 1.1 1996/08/28 07:23:18 scrappy Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PATHNODE_H
14 #define PATHNODE_H
15
16 /*
17  * prototypes for pathnode.c
18  */
19 extern bool path_is_cheaper(Path *path1, Path *path2);
20 extern Path *set_cheapest(Rel *parent_rel, List *pathlist);
21 extern List *add_pathlist(Rel *parent_rel, List *unique_paths,
22                               List *new_paths);
23 extern Path *create_seqscan_path(Rel *rel);
24 extern IndexPath *create_index_path(Query *root, Rel *rel, Rel *index,
25                          List *restriction_clauses, bool is_join_scan);
26 extern JoinPath *create_nestloop_path(Rel *joinrel, Rel *outer_rel,
27                          Path *outer_path, Path *inner_path, List *keys);
28 extern MergePath *create_mergesort_path(Rel *joinrel, int outersize,
29      int innersize, int outerwidth, int innerwidth, Path *outer_path,
30      Path *inner_path, List *keys, MergeOrder *order,
31      List *mergeclauses, List *outersortkeys, List *innersortkeys);
32
33 extern HashPath *create_hashjoin_path(Rel *joinrel, int outersize,
34      int innersize, int outerwidth, int innerwidth, Path *outer_path,
35      Path *inner_path, List *keys, Oid operator, List *hashclauses,
36      List *outerkeys, List *innerkeys);
37
38 /*
39  * prototypes for rel.c
40  */
41 extern Rel *rel_member(List *relid, List *rels);
42 extern Rel *get_base_rel(Query* root, int relid);
43 extern Rel *get_join_rel(Query* root, List *relid);
44
45 /*
46  * prototypes for indexnode.h
47  */
48 extern List *find_relation_indices(Query *root,Rel *rel);
49
50 #endif  /* PATHNODE_H */