Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
6fcf2d7c
Commit
6fcf2d7c
authored
Feb 13, 1998
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New SubPlan node for subselects.
New PARAM_EXEC type.
parent
eab1471b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
30 deletions
+83
-30
src/include/nodes/execnodes.h
src/include/nodes/execnodes.h
+27
-24
src/include/nodes/nodes.h
src/include/nodes/nodes.h
+2
-1
src/include/nodes/params.h
src/include/nodes/params.h
+12
-1
src/include/nodes/plannodes.h
src/include/nodes/plannodes.h
+39
-1
src/include/nodes/primnodes.h
src/include/nodes/primnodes.h
+3
-3
No files found.
src/include/nodes/execnodes.h
View file @
6fcf2d7c
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execnodes.h,v 1.1
2 1997/09/08 21:52:40 momjian
Exp $
* $Id: execnodes.h,v 1.1
3 1998/02/13 03:45:22 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -80,16 +80,17 @@ typedef struct RelationInfo
*/
typedef
struct
ExprContext
{
NodeTag
type
;
TupleTableSlot
*
ecxt_scantuple
;
TupleTableSlot
*
ecxt_innertuple
;
TupleTableSlot
*
ecxt_outertuple
;
Relation
ecxt_relation
;
Index
ecxt_relid
;
ParamListInfo
ecxt_param_list_info
;
List
*
ecxt_range_table
;
Datum
*
ecxt_values
;
/* precomputed values for aggreg */
char
*
ecxt_nulls
;
/* null flags for aggreg values */
NodeTag
type
;
TupleTableSlot
*
ecxt_scantuple
;
TupleTableSlot
*
ecxt_innertuple
;
TupleTableSlot
*
ecxt_outertuple
;
Relation
ecxt_relation
;
Index
ecxt_relid
;
ParamListInfo
ecxt_param_list_info
;
ParamExecData
*
ecxt_param_exec_vals
;
/* this is for subselects */
List
*
ecxt_range_table
;
Datum
*
ecxt_values
;
/* precomputed values for aggreg */
char
*
ecxt_nulls
;
/* null flags for aggreg values */
}
ExprContext
;
/* ----------------
...
...
@@ -193,18 +194,19 @@ typedef struct JunkFilter
*/
typedef
struct
EState
{
NodeTag
type
;
ScanDirection
es_direction
;
List
*
es_range_table
;
RelationInfo
*
es_result_relation_info
;
Relation
es_into_relation_descriptor
;
ParamListInfo
es_param_list_info
;
int
es_BaseId
;
TupleTable
es_tupleTable
;
JunkFilter
*
es_junkFilter
;
int
*
es_refcount
;
uint32
es_processed
;
/* # of tuples processed */
Oid
es_lastoid
;
/* last oid processed (by INSERT) */
NodeTag
type
;
ScanDirection
es_direction
;
List
*
es_range_table
;
RelationInfo
*
es_result_relation_info
;
Relation
es_into_relation_descriptor
;
ParamListInfo
es_param_list_info
;
ParamExecData
*
es_param_exec_vals
;
/* this is for subselects */
int
es_BaseId
;
TupleTable
es_tupleTable
;
JunkFilter
*
es_junkFilter
;
int
*
es_refcount
;
uint32
es_processed
;
/* # of tuples processed */
Oid
es_lastoid
;
/* last oid processed (by INSERT) */
}
EState
;
/* ----------------
...
...
@@ -292,7 +294,8 @@ typedef struct CommonState
typedef
struct
ResultState
{
CommonState
cstate
;
/* its first field is NodeTag */
int
rs_done
;
bool
rs_done
;
bool
rs_checkqual
;
}
ResultState
;
/* ----------------
...
...
src/include/nodes/nodes.h
View file @
6fcf2d7c
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodes.h,v 1.2
3 1998/01/17 04:53:38 momjian
Exp $
* $Id: nodes.h,v 1.2
4 1998/02/13 03:45:23 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -47,6 +47,7 @@ typedef enum NodeTag
T_Choose
,
T_Tee
,
T_Group
,
T_SubPlan
,
/*---------------------
* TAGS FOR PRIMITIVE NODES (primnodes.h)
...
...
src/include/nodes/params.h
View file @
6fcf2d7c
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: params.h,v 1.
6 1997/09/08 21:52:48 momjian
Exp $
* $Id: params.h,v 1.
7 1998/02/13 03:45:24 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -36,12 +36,16 @@
*
* PARAM_OLD: Same as PARAM_NEW, but in this case we refer to
* the "OLD" tuple.
*
* PARAM_EXEC: Evaluated by executor. Used for subselect...
*
*/
#define PARAM_NAMED 11
#define PARAM_NUM 12
#define PARAM_NEW 13
#define PARAM_OLD 14
#define PARAM_EXEC 15
#define PARAM_INVALID 100
...
...
@@ -87,4 +91,11 @@ typedef struct ParamListInfoData
typedef
ParamListInfoData
*
ParamListInfo
;
typedef
struct
ParamExecData
{
void
*
execPlan
;
/* plan must be executed to get param value */
Datum
value
;
bool
isnull
;
}
ParamExecData
;
#endif
/* PARAMS_H */
src/include/nodes/plannodes.h
View file @
6fcf2d7c
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: plannodes.h,v 1.1
3 1998/01/15 19:00:13 momjian
Exp $
* $Id: plannodes.h,v 1.1
4 1998/02/13 03:45:25 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -74,6 +74,24 @@ typedef struct Plan
List
*
qual
;
/* Node* or List* ?? */
struct
Plan
*
lefttree
;
struct
Plan
*
righttree
;
List
*
extParam
;
/* indices of _all_ _external_ PARAM_EXEC for
* this plan in global es_param_exec_vals.
* Params from setParam from initPlan-s
* are not included, but their execParam-s
* are here!!! */
List
*
locParam
;
/* someones from setParam-s */
List
*
chgParam
;
/* list of changed ones from the above */
List
*
initPlan
;
/* Init Plan nodes (un-correlated expr subselects) */
List
*
subPlan
;
/* Other SubPlan nodes */
/*
* We really need in some TopPlan node to store range table and
* resultRelation from Query there and get rid of Query itself
* from Executor. Some other stuff like below could be put there, too.
*/
int
nParamExec
;
/* Number of them in entire query. This is
* to get Executor know about how many
* param_exec there are in query plan. */
}
Plan
;
/* ----------------
...
...
@@ -335,4 +353,24 @@ typedef struct Tee
* plans */
}
Tee
;
/* ---------------------
* SubPlan node
* ---------------------
*/
typedef
struct
SubPlan
{
NodeTag
type
;
Plan
*
plan
;
/* subselect plan itself */
int
plan_id
;
/* dummy thing because of we haven't
* equal funcs for plan nodes... actually,
* we could put *plan itself somewhere else
* (TopPlan node ?)... */
List
*
rtable
;
/* range table */
List
*
setParam
;
/* non-correlated EXPR & EXISTS subqueries
* have to set some Params for paren Plan */
List
*
parParam
;
/* indices of corr. Vars from parent plan */
SubLink
*
sublink
;
/* SubLink node for subselects in WHERE and HAVING */
bool
shutdown
;
/* shutdown plan if TRUE */
}
SubPlan
;
#endif
/* PLANNODES_H */
src/include/nodes/primnodes.h
View file @
6fcf2d7c
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: primnodes.h,v 1.1
8 1998/02/10 16:04:27 momjian
Exp $
* $Id: primnodes.h,v 1.1
9 1998/02/13 03:45:29 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -86,7 +86,7 @@ typedef struct Fjoin
*/
typedef
enum
OpType
{
OP_EXPR
,
FUNC_EXPR
,
OR_EXPR
,
AND_EXPR
,
NOT_EXPR
OP_EXPR
,
FUNC_EXPR
,
OR_EXPR
,
AND_EXPR
,
NOT_EXPR
,
SUBPLAN_EXPR
}
OpType
;
typedef
struct
Expr
...
...
@@ -94,7 +94,7 @@ typedef struct Expr
NodeTag
type
;
Oid
typeOid
;
/* oid of the type of this expr */
OpType
opType
;
/* type of the op */
Node
*
oper
;
/* could be Oper or Func */
Node
*
oper
;
/* could be Oper or Func
or SubPlan
*/
List
*
args
;
/* list of argument nodes */
}
Expr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment