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