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-03-27 19:58:26 -05:00
|
|
|
* $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.49 2005/03/28 00:58:26 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-15 19:04:24 -04:00
|
|
|
#include "nodes/parsenodes.h"
|
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;
|
|
|
|
|
|
2003-01-20 13:55:07 -05:00
|
|
|
extern Node *pull_up_IN_clauses(Query *parse, Node *node);
|
|
|
|
|
extern Node *pull_up_subqueries(Query *parse, Node *jtnode,
|
|
|
|
|
bool below_outer_join);
|
2003-02-09 18:57:19 -05:00
|
|
|
extern void reduce_outer_joins(Query *parse);
|
|
|
|
|
extern Node *simplify_jointree(Query *parse, Node *jtnode);
|
2003-02-08 15:20:55 -05:00
|
|
|
extern Relids get_relids_in_jointree(Node *jtnode);
|
|
|
|
|
extern Relids get_relids_for_join(Query *parse, 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-03-17 18:45:09 -05:00
|
|
|
extern List *preprocess_targetlist(Query *parse, List *tlist);
|
1996-07-09 02:22:35 -04:00
|
|
|
|
1999-06-06 13:38:11 -04:00
|
|
|
/*
|
|
|
|
|
* prototypes for prepunion.c
|
|
|
|
|
*/
|
2004-04-07 14:17:25 -04:00
|
|
|
extern Plan *plan_set_operations(Query *parse, 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
|
|
|
|
2004-10-02 18:39:49 -04:00
|
|
|
extern List *expand_inherited_rtentry(Query *parse, 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 */
|