]> granicus.if.org Git - postgresql/blob - src/include/optimizer/pathnode.h
Major planner/optimizer revision: get rid of PathOrder node type,
[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.21 1999/08/16 02:17:45 tgl Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PATHNODE_H
14 #define PATHNODE_H
15
16 #include "nodes/relation.h"
17
18 /*
19  * prototypes for pathnode.c
20  */
21 extern bool path_is_cheaper(Path *path1, Path *path2);
22 extern Path *set_cheapest(RelOptInfo *parent_rel, List *pathlist);
23 extern List *add_pathlist(RelOptInfo *parent_rel, List *old_paths,
24                           List *new_paths);
25
26 extern Path *create_seqscan_path(RelOptInfo *rel);
27
28 extern IndexPath *create_index_path(Query *root, RelOptInfo *rel,
29                 RelOptInfo *index, List *restriction_clauses);
30
31 extern NestPath *create_nestloop_path(RelOptInfo *joinrel,
32                 RelOptInfo *outer_rel, Path *outer_path, Path *inner_path,
33                 List *pathkeys);
34
35 extern MergePath *create_mergejoin_path(RelOptInfo *joinrel, int outersize,
36                 int innersize, int outerwidth, int innerwidth, Path *outer_path,
37                 Path *inner_path, List *pathkeys,
38                 List *mergeclauses, List *outersortkeys, List *innersortkeys);
39
40 extern HashPath *create_hashjoin_path(RelOptInfo *joinrel, int outersize,
41                 int innersize, int outerwidth, int innerwidth, Path *outer_path,
42                 Path *inner_path, List *hashclauses, Cost innerdisbursion);
43
44 /*
45  * prototypes for rel.c
46  */
47 extern RelOptInfo *rel_member(Relids relid, List *rels);
48 extern RelOptInfo *get_base_rel(Query *root, int relid);
49 extern RelOptInfo *get_join_rel(Query *root, Relids relid);
50
51 /*
52  * prototypes for indexnode.h
53  */
54 extern List *find_relation_indices(Query *root, RelOptInfo *rel);
55
56 #endif   /* PATHNODE_H */