aboutsummaryrefslogtreecommitdiff
path: root/src/include/optimizer/pathnode.h
blob: 9474e1ea8d9c090daf8eb742799069b978779445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*-------------------------------------------------------------------------
 *
 * pathnode.h--
 *	  prototypes for pathnode.c, indexnode.c, relnode.c.
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 * $Id: pathnode.h,v 1.2 1997/09/07 04:59:11 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
#ifndef PATHNODE_H
#define PATHNODE_H

/*
 * prototypes for pathnode.c
 */
extern bool		path_is_cheaper(Path * path1, Path * path2);
extern Path    *set_cheapest(Rel * parent_rel, List * pathlist);
extern List    *
add_pathlist(Rel * parent_rel, List * unique_paths,
			 List * new_paths);
extern Path    *create_seqscan_path(Rel * rel);
extern IndexPath *
create_index_path(Query * root, Rel * rel, Rel * index,
				  List * restriction_clauses, bool is_join_scan);
extern JoinPath *
create_nestloop_path(Rel * joinrel, Rel * outer_rel,
					 Path * outer_path, Path * inner_path, List * keys);
extern MergePath *
create_mergesort_path(Rel * joinrel, int outersize,
		int innersize, int outerwidth, int innerwidth, Path * outer_path,
					  Path * inner_path, List * keys, MergeOrder * order,
		List * mergeclauses, List * outersortkeys, List * innersortkeys);

extern HashPath *
create_hashjoin_path(Rel * joinrel, int outersize,
		int innersize, int outerwidth, int innerwidth, Path * outer_path,
		Path * inner_path, List * keys, Oid operator, List * hashclauses,
					 List * outerkeys, List * innerkeys);

/*
 * prototypes for rel.c
 */
extern Rel	   *rel_member(List * relid, List * rels);
extern Rel	   *get_base_rel(Query * root, int relid);
extern Rel	   *get_join_rel(Query * root, List * relid);

/*
 * prototypes for indexnode.h
 */
extern List    *find_relation_indices(Query * root, Rel * rel);

#endif							/* PATHNODE_H */