1996-07-09 06:22:35 +00:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-13 23:22:53 +00:00
|
|
|
* pathnode.h
|
2000-09-29 18:21:41 +00:00
|
|
|
* prototypes for pathnode.c, relnode.c.
|
1996-07-09 06:22:35 +00:00
|
|
|
*
|
|
|
|
*
|
2004-12-31 22:04:05 +00:00
|
|
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
2000-01-26 05:58:53 +00:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 06:22:35 +00:00
|
|
|
*
|
2005-06-05 22:32:58 +00:00
|
|
|
* $PostgreSQL: pgsql/src/include/optimizer/pathnode.h,v 1.61 2005/06/05 22:32:58 tgl Exp $
|
1996-07-09 06:22:35 +00:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PATHNODE_H
|
|
|
|
#define PATHNODE_H
|
|
|
|
|
1997-11-26 01:14:33 +00:00
|
|
|
#include "nodes/relation.h"
|
|
|
|
|
2003-02-08 20:20:55 +00:00
|
|
|
|
1996-07-09 06:22:35 +00:00
|
|
|
/*
|
|
|
|
* prototypes for pathnode.c
|
|
|
|
*/
|
2000-02-15 20:49:31 +00:00
|
|
|
extern int compare_path_costs(Path *path1, Path *path2,
|
2000-04-12 17:17:23 +00:00
|
|
|
CostSelector criterion);
|
2000-02-15 20:49:31 +00:00
|
|
|
extern int compare_fractional_path_costs(Path *path1, Path *path2,
|
2000-04-12 17:17:23 +00:00
|
|
|
double fraction);
|
2000-02-15 20:49:31 +00:00
|
|
|
extern void set_cheapest(RelOptInfo *parent_rel);
|
2000-02-07 04:41:04 +00:00
|
|
|
extern void add_path(RelOptInfo *parent_rel, Path *new_path);
|
1999-08-16 02:17:58 +00:00
|
|
|
|
2005-06-05 22:32:58 +00:00
|
|
|
extern Path *create_seqscan_path(PlannerInfo *root, RelOptInfo *rel);
|
|
|
|
extern IndexPath *create_index_path(PlannerInfo *root,
|
2000-04-12 17:17:23 +00:00
|
|
|
IndexOptInfo *index,
|
2005-04-22 21:58:32 +00:00
|
|
|
List *clause_groups,
|
2000-12-14 22:30:45 +00:00
|
|
|
List *pathkeys,
|
2005-04-22 21:58:32 +00:00
|
|
|
ScanDirection indexscandir,
|
|
|
|
bool isjoininner);
|
2005-06-05 22:32:58 +00:00
|
|
|
extern BitmapHeapPath *create_bitmap_heap_path(PlannerInfo *root,
|
2005-04-19 22:35:18 +00:00
|
|
|
RelOptInfo *rel,
|
2005-04-22 21:58:32 +00:00
|
|
|
Path *bitmapqual,
|
|
|
|
bool isjoininner);
|
2005-06-05 22:32:58 +00:00
|
|
|
extern BitmapAndPath *create_bitmap_and_path(PlannerInfo *root,
|
2005-04-21 19:18:13 +00:00
|
|
|
RelOptInfo *rel,
|
|
|
|
List *bitmapquals);
|
2005-06-05 22:32:58 +00:00
|
|
|
extern BitmapOrPath *create_bitmap_or_path(PlannerInfo *root,
|
2005-04-21 19:18:13 +00:00
|
|
|
RelOptInfo *rel,
|
|
|
|
List *bitmapquals);
|
2005-06-05 22:32:58 +00:00
|
|
|
extern TidPath *create_tidscan_path(PlannerInfo *root, RelOptInfo *rel,
|
2001-10-25 05:50:21 +00:00
|
|
|
List *tideval);
|
2000-11-12 00:37:02 +00:00
|
|
|
extern AppendPath *create_append_path(RelOptInfo *rel, List *subpaths);
|
2002-11-06 00:00:45 +00:00
|
|
|
extern ResultPath *create_result_path(RelOptInfo *rel, Path *subpath,
|
2003-08-04 00:43:34 +00:00
|
|
|
List *constantqual);
|
2002-11-30 05:21:03 +00:00
|
|
|
extern MaterialPath *create_material_path(RelOptInfo *rel, Path *subpath);
|
2005-06-05 22:32:58 +00:00
|
|
|
extern UniquePath *create_unique_path(PlannerInfo *root, RelOptInfo *rel,
|
2003-08-04 00:43:34 +00:00
|
|
|
Path *subpath);
|
2003-02-15 20:12:41 +00:00
|
|
|
extern Path *create_subqueryscan_path(RelOptInfo *rel, List *pathkeys);
|
2005-06-05 22:32:58 +00:00
|
|
|
extern Path *create_functionscan_path(PlannerInfo *root, RelOptInfo *rel);
|
1999-08-16 02:17:58 +00:00
|
|
|
|
2005-06-05 22:32:58 +00:00
|
|
|
extern NestPath *create_nestloop_path(PlannerInfo *root,
|
2001-10-25 05:50:21 +00:00
|
|
|
RelOptInfo *joinrel,
|
|
|
|
JoinType jointype,
|
|
|
|
Path *outer_path,
|
|
|
|
Path *inner_path,
|
|
|
|
List *restrict_clauses,
|
|
|
|
List *pathkeys);
|
2000-01-09 00:26:47 +00:00
|
|
|
|
2005-06-05 22:32:58 +00:00
|
|
|
extern MergePath *create_mergejoin_path(PlannerInfo *root,
|
2001-10-25 05:50:21 +00:00
|
|
|
RelOptInfo *joinrel,
|
|
|
|
JoinType jointype,
|
|
|
|
Path *outer_path,
|
|
|
|
Path *inner_path,
|
|
|
|
List *restrict_clauses,
|
|
|
|
List *pathkeys,
|
|
|
|
List *mergeclauses,
|
|
|
|
List *outersortkeys,
|
|
|
|
List *innersortkeys);
|
2000-01-09 00:26:47 +00:00
|
|
|
|
2005-06-05 22:32:58 +00:00
|
|
|
extern HashPath *create_hashjoin_path(PlannerInfo *root,
|
2001-10-25 05:50:21 +00:00
|
|
|
RelOptInfo *joinrel,
|
|
|
|
JoinType jointype,
|
|
|
|
Path *outer_path,
|
|
|
|
Path *inner_path,
|
|
|
|
List *restrict_clauses,
|
|
|
|
List *hashclauses);
|
1996-07-09 06:22:35 +00:00
|
|
|
|
|
|
|
/*
|
2000-02-07 04:41:04 +00:00
|
|
|
* prototypes for relnode.c
|
1996-07-09 06:22:35 +00:00
|
|
|
*/
|
2005-06-05 22:32:58 +00:00
|
|
|
extern void build_base_rel(PlannerInfo *root, int relid);
|
|
|
|
extern RelOptInfo *build_other_rel(PlannerInfo *root, int relid);
|
|
|
|
extern RelOptInfo *find_base_rel(PlannerInfo *root, int relid);
|
|
|
|
extern RelOptInfo *find_join_rel(PlannerInfo *root, Relids relids);
|
|
|
|
extern RelOptInfo *build_join_rel(PlannerInfo *root,
|
2003-08-04 00:43:34 +00:00
|
|
|
Relids joinrelids,
|
|
|
|
RelOptInfo *outer_rel,
|
|
|
|
RelOptInfo *inner_rel,
|
|
|
|
JoinType jointype,
|
|
|
|
List **restrictlist_ptr);
|
2001-10-28 06:26:15 +00:00
|
|
|
|
2001-11-05 17:46:40 +00:00
|
|
|
#endif /* PATHNODE_H */
|