1996-07-09 02:22:35 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
1999-02-13 18:22:53 -05:00
|
|
|
* prep.h
|
1999-09-12 14:08:17 -04:00
|
|
|
* prototypes for files in optimizer/prep/
|
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-06-09 22:21:05 -04:00
|
|
|
* $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.51 2005/06/10 02:21:05 tgl Exp $
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
#ifndef PREP_H
|
1997-09-07 01:04:48 -04:00
|
|
|
#define PREP_H
|
1996-07-09 02:22:35 -04:00
|
|
|
|
1999-07-16 13:07:40 -04:00
|
|
|
#include "nodes/plannodes.h"
|
2003-02-08 15:20:55 -05:00
|
|
|
#include "nodes/relation.h"
|
|
|
|
|
|
1996-07-09 02:22:35 -04:00
|
|
|
|
2003-01-20 13:55:07 -05:00
|
|
|
/*
|
|
|
|
|
* prototypes for prepjointree.c
|
|
|
|
|
*/
|
2003-01-25 18:10:30 -05:00
|
|
|
extern int from_collapse_limit;
|
|
|
|
|
extern int join_collapse_limit;
|
|
|
|
|
|
2005-06-05 18:32:58 -04:00
|
|
|
extern Node *pull_up_IN_clauses(PlannerInfo *root, Node *node);
|
|
|
|
|
extern Node *pull_up_subqueries(PlannerInfo *root, Node *jtnode,
|
2003-01-20 13:55:07 -05:00
|
|
|
bool below_outer_join);
|
2005-06-05 18:32:58 -04:00
|
|
|
extern void reduce_outer_joins(PlannerInfo *root);
|
|
|
|
|
extern Node *simplify_jointree(PlannerInfo *root, Node *jtnode);
|
2003-02-08 15:20:55 -05:00
|
|
|
extern Relids get_relids_in_jointree(Node *jtnode);
|
2005-06-05 18:32:58 -04:00
|
|
|
extern Relids get_relids_for_join(PlannerInfo *root, int joinrelid);
|
2003-01-20 13:55:07 -05:00
|
|
|
|
1996-07-09 02:22:35 -04:00
|
|
|
/*
|
1999-06-06 13:38:11 -04:00
|
|
|
* prototypes for prepqual.c
|
1996-07-09 02:22:35 -04:00
|
|
|
*/
|
2003-12-28 16:57:37 -05:00
|
|
|
extern Expr *canonicalize_qual(Expr *qual);
|
1996-07-09 02:22:35 -04:00
|
|
|
|
|
|
|
|
/*
|
1999-06-06 13:38:11 -04:00
|
|
|
* prototypes for preptlist.c
|
1996-07-09 02:22:35 -04:00
|
|
|
*/
|
2005-06-05 18:32:58 -04:00
|
|
|
extern List *preprocess_targetlist(PlannerInfo *root, List *tlist);
|
1996-07-09 02:22:35 -04:00
|
|
|
|
1999-06-06 13:38:11 -04:00
|
|
|
/*
|
|
|
|
|
* prototypes for prepunion.c
|
|
|
|
|
*/
|
2005-06-09 22:21:05 -04:00
|
|
|
extern Plan *plan_set_operations(PlannerInfo *root, double tuple_fraction,
|
|
|
|
|
List **sortClauses);
|
2000-11-11 19:37:02 -05:00
|
|
|
|
1999-12-13 22:35:28 -05:00
|
|
|
extern List *find_all_inheritors(Oid parentrel);
|
2001-05-20 16:28:20 -04:00
|
|
|
|
2005-06-05 18:32:58 -04:00
|
|
|
extern List *expand_inherited_rtentry(PlannerInfo *root, Index rti);
|
2000-11-11 19:37:02 -05:00
|
|
|
|
|
|
|
|
extern Node *adjust_inherited_attrs(Node *node,
|
2001-03-21 23:01:46 -05:00
|
|
|
Index old_rt_index, Oid old_relid,
|
|
|
|
|
Index new_rt_index, Oid new_relid);
|
2001-10-28 01:26:15 -05:00
|
|
|
|
2001-11-05 12:46:40 -05:00
|
|
|
#endif /* PREP_H */
|