mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Subselects...
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: clauses.h,v 1.8 1998/01/24 22:49:39 momjian Exp $
|
||||
* $Id: clauses.h,v 1.9 1998/02/13 03:46:54 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -48,4 +48,8 @@ extern void get_rels_atts(Node *clause, int *relid1,
|
||||
AttrNumber *attno1, int *relid2, AttrNumber *attno2);
|
||||
extern void CommuteClause(Node *clause);
|
||||
|
||||
#define is_subplan(clause) ((Node*) clause != NULL && \
|
||||
nodeTag((Node*) clause) == T_Expr && \
|
||||
((Expr *) clause)->opType == SUBPLAN_EXPR)
|
||||
|
||||
#endif /* CLAUSES_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: planner.h,v 1.7 1997/11/26 01:13:49 momjian Exp $
|
||||
* $Id: planner.h,v 1.8 1998/02/13 03:46:56 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "parser/parse_node.h"
|
||||
|
||||
extern Plan *planner(Query *parse);
|
||||
extern Plan *union_planner(Query *parse);
|
||||
extern void pg_checkretval(Oid rettype, QueryTreeList *querytree_list);
|
||||
|
||||
#endif /* PLANNER_H */
|
||||
|
||||
20
src/include/optimizer/subselect.h
Normal file
20
src/include/optimizer/subselect.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* subselect.h--
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef SUBSELECT_H
|
||||
#define SUBSELECT_H
|
||||
|
||||
extern int PlannerQueryLevel; /* level of current query */
|
||||
extern List *PlannerVarParam; /* correlation Vars to Param mapper */
|
||||
extern List *PlannerParamVar; /* to get Var from Param->paramid */
|
||||
extern List *PlannerInitPlan; /* init subplans for current query */
|
||||
extern int PlannerPlanId; /* to assigne unique ID to subquery plans */
|
||||
|
||||
extern List *SS_finalize_plan (Plan *plan);
|
||||
extern Node *SS_replace_correlation_vars (Node *expr);
|
||||
extern Node *SS_process_sublinks (Node *expr);
|
||||
|
||||
#endif /* SUBSELECT_H */
|
||||
Reference in New Issue
Block a user