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
6a45941f
Commit
6a45941f
authored
Dec 18, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Existential, and ifdef out generate_fjoin. Neither did anything.
parent
4469eb63
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
26 additions
and
200 deletions
+26
-200
src/backend/executor/execTuples.c
src/backend/executor/execTuples.c
+1
-3
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+1
-22
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+1
-19
src/backend/nodes/print.c
src/backend/nodes/print.c
+1
-4
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+1
-23
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/createplan.c
+4
-3
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planmain.c
+5
-1
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/planner.c
+7
-50
src/backend/optimizer/prep/prepqual.c
src/backend/optimizer/prep/prepqual.c
+1
-58
src/include/nodes/nodes.h
src/include/nodes/nodes.h
+1
-2
src/include/nodes/plannodes.h
src/include/nodes/plannodes.h
+1
-8
src/include/optimizer/planmain.h
src/include/optimizer/planmain.h
+1
-3
src/include/optimizer/prep.h
src/include/optimizer/prep.h
+1
-4
No files found.
src/backend/executor/execTuples.c
View file @
6a45941f
...
...
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.1
2 1997/11/26 01:10:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.1
3 1997/12/18 12:53:42
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -888,8 +888,6 @@ NodeGetResultTupleSlot(Plan *node)
* the node's inner or outer subplan easily without having
* to inspect the subplan.. -cim 10/16/89
*
* Assume that for existential nodes, we get the targetlist out
* of the right node's targetlist
* ----------------------------------------------------------------
*/
...
...
src/backend/nodes/copyfuncs.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
19 1997/12/18 05:58:40
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
20 1997/12/18 12:53:48
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -108,24 +108,6 @@ _copyPlan(Plan *from)
}
/* ----------------
* _copyExistential
* ----------------
*/
static
Existential
*
_copyExistential
(
Existential
*
from
)
{
Existential
*
newnode
=
makeNode
(
Existential
);
/* ----------------
* copy node superclass fields
* ----------------
*/
CopyPlanFields
(
from
,
newnode
);
return
newnode
;
}
/* ----------------
* _copyResult
* ----------------
...
...
@@ -1623,9 +1605,6 @@ copyObject(void *from)
case
T_Plan
:
retval
=
_copyPlan
(
from
);
break
;
case
T_Existential
:
retval
=
_copyExistential
(
from
);
break
;
case
T_Result
:
retval
=
_copyResult
(
from
);
break
;
...
...
src/backend/nodes/outfuncs.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.1
1 1997/12/04 23:20:32 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.1
2 1997/12/18 12:53:51 momjian
Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
...
...
@@ -258,21 +258,6 @@ _outResult(StringInfo str, Result *node)
}
/*
* Existential is a subclass of Plan.
*/
static
void
_outExistential
(
StringInfo
str
,
Existential
*
node
)
{
char
buf
[
500
];
sprintf
(
buf
,
"EXISTENTIAL"
);
appendStringInfo
(
str
,
buf
);
_outPlanInfo
(
str
,
(
Plan
*
)
node
);
}
/*
* Append is a subclass of Plan.
*/
...
...
@@ -1641,9 +1626,6 @@ _outNode(StringInfo str, void *obj)
case
T_Result
:
_outResult
(
str
,
obj
);
break
;
case
T_Existential
:
_outExistential
(
str
,
obj
);
break
;
case
T_Append
:
_outAppend
(
str
,
obj
);
break
;
...
...
src/backend/nodes/print.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.1
1 1997/11/25 21:59:44
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.1
2 1997/12/18 12:53:56
momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -304,9 +304,6 @@ plannode_type(Plan *p)
case
T_Plan
:
return
"PLAN"
;
break
;
case
T_Existential
:
return
"EXISTENTIAL"
;
break
;
case
T_Result
:
return
"RESULT"
;
break
;
...
...
src/backend/nodes/readfuncs.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.1
0 1997/10/25 01:09:30
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.1
1 1997/12/18 12:53:59
momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
...
...
@@ -217,24 +217,6 @@ _readResult()
return
(
local_node
);
}
/* ----------------
* _readExistential
*
* Existential nodes are only used by the planner.
* ----------------
*/
static
Existential
*
_readExistential
()
{
Existential
*
local_node
;
local_node
=
makeNode
(
Existential
);
_getPlan
((
Plan
*
)
local_node
);
return
(
local_node
);
}
/* ----------------
* _readAppend
*
...
...
@@ -1884,10 +1866,6 @@ parsePlanString(void)
{
return_value
=
_readResult
();
}
else
if
(
!
strncmp
(
token
,
"EXISTENTIAL"
,
11
))
{
return_value
=
_readExistential
();
}
else
if
(
!
strncmp
(
token
,
"APPEND"
,
6
))
{
return_value
=
_readAppend
();
...
...
src/backend/optimizer/plan/createplan.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.
19 1997/12/18 12:30:43
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.
20 1997/12/18 12:54:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1175,10 +1175,10 @@ make_unique(List *tlist, Plan *lefttree, char *uniqueAttr)
return
(
node
);
}
#ifdef NOT_USED
List
*
generate_fjoin
(
List
*
tlist
)
{
#if 0
List
tlistP
;
List
newTlist
=
NIL
;
List
fjoinList
=
NIL
;
...
...
@@ -1227,6 +1227,7 @@ generate_fjoin(List *tlist)
newTlist
=
lappend
(
newTlist
,
tempList
);
}
return
newTlist
;
#endif
return
tlist
;
/* do nothing for now - ay 10/94 */
}
#endif
src/backend/optimizer/plan/planmain.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.1
0 1997/12/18 12:30:44
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.1
1 1997/12/18 12:54:09
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -259,7 +259,9 @@ query_planner(Query *root,
* Destructively modify the query plan's targetlist to add fjoin lists
* to flatten functions that return sets of base types
*/
#ifdef NOT_USED
subplan
->
targetlist
=
generate_fjoin
(
subplan
->
targetlist
);
#endif
return
(
subplan
);
}
...
...
@@ -360,7 +362,9 @@ make_result(List *tlist,
Result
*
node
=
makeNode
(
Result
);
Plan
*
plan
=
&
node
->
plan
;
#ifdef NOT_USED
tlist
=
generate_fjoin
(
tlist
);
#endif
plan
->
cost
=
(
subplan
?
subplan
->
cost
:
0
);
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
...
...
src/backend/optimizer/plan/planner.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.1
1 1997/11/25 21:59:59
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.1
2 1997/12/18 12:54:11
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -48,7 +48,6 @@
static
Plan
*
make_sortplan
(
List
*
tlist
,
List
*
sortcls
,
Plan
*
plannode
);
static
Plan
*
init_query_planner
(
Query
*
parse
);
static
Existential
*
make_existential
(
Plan
*
left
,
Plan
*
right
);
/*****************************************************************************
*
...
...
@@ -184,8 +183,7 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
/*
* init-query-planner--
* Deals with all non-union preprocessing, including existential
* qualifications and CNFifying the qualifications.
* Deals with all non-union preprocessing,and CNFifying the qualifications.
*
* Returns a query plan.
* MODIFIES: tlist,qual
...
...
@@ -195,8 +193,6 @@ static Plan *
init_query_planner
(
Query
*
root
)
{
List
*
primary_qual
;
List
*
existential_qual
;
Existential
*
exist_plan
;
List
*
tlist
=
root
->
targetList
;
tlist
=
preprocess_targetlist
(
tlist
,
...
...
@@ -204,51 +200,12 @@ init_query_planner(Query *root)
root
->
resultRelation
,
root
->
rtable
);
primary_qual
=
preprocess_qualification
((
Expr
*
)
root
->
qual
,
tlist
,
&
existential_qual
);
primary_qual
=
cnfify
((
Expr
*
)
root
->
qual
,
true
);
if
(
existential_qual
==
NULL
)
{
return
(
query_planner
(
root
,
root
->
commandType
,
tlist
,
primary_qual
));
}
else
{
int
temp
=
root
->
commandType
;
Plan
*
existential_plan
;
root
->
commandType
=
CMD_SELECT
;
existential_plan
=
query_planner
(
root
,
temp
,
NIL
,
existential_qual
);
exist_plan
=
make_existential
(
existential_plan
,
query_planner
(
root
,
root
->
commandType
,
tlist
,
primary_qual
));
return
((
Plan
*
)
exist_plan
);
}
}
/*
* make_existential--
* Instantiates an existential plan node and fills in
* the left and right subtree slots.
*/
static
Existential
*
make_existential
(
Plan
*
left
,
Plan
*
right
)
{
Existential
*
node
=
makeNode
(
Existential
);
node
->
lefttree
=
left
;
node
->
righttree
=
left
;
return
(
node
);
return
(
query_planner
(
root
,
root
->
commandType
,
tlist
,
primary_qual
));
}
/*
...
...
src/backend/optimizer/prep/prepqual.c
View file @
6a45941f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.
6 1997/09/08 21:45:31
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.
7 1997/12/18 12:54:15
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -36,42 +36,6 @@ static List *qualcleanup(Expr *qual);
static
List
*
remove_ands
(
Expr
*
qual
);
static
List
*
remove_duplicates
(
List
*
list
);
/*
* preprocess-qualification--
* Driver routine for modifying the parse tree qualification.
*
* Returns the new base qualification and the existential qualification
* in existentialQualPtr.
*
* XXX right now, update_clauses() does nothing so
* preprocess-qualification simply converts the qual in conjunctive
* normal form (see cnfify() below )
*/
List
*
preprocess_qualification
(
Expr
*
qual
,
List
*
tlist
,
List
**
existentialQualPtr
)
{
List
*
cnf_qual
=
cnfify
(
qual
,
true
);
/*
List *existential_qual =
update_clauses(intCons(_query_result_relation_,
update_relations(tlist)),
cnf_qual,
_query_command_type_);
if (existential_qual) {
*existentialQualPtr = existential_qual;
return set_difference(cnf_qual, existential_qual);
} else {
*existentialQualPtr = NIL;
return cnf_qual;
}
*/
/* update_clauses() is not working right now */
*
existentialQualPtr
=
NIL
;
return
cnf_qual
;
}
/*****************************************************************************
*
* CNF CONVERSION ROUTINES
...
...
@@ -607,27 +571,6 @@ remove_ands(Expr *qual)
}
}
/*****************************************************************************
*
* EXISTENTIAL QUALIFICATIONS
*
*****************************************************************************/
/*
* update-relations--
* Returns the range table indices (i.e., varnos) for all relations which
* are referenced in the target list.
*
*/
#ifdef NOT_USED
static
List
*
update_relations
(
List
*
tlist
)
{
return
(
NIL
);
}
#endif
/*****************************************************************************
*
*
...
...
src/include/nodes/nodes.h
View file @
6a45941f
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodes.h,v 1.
19 1997/12/04 23:43:59 thomas
Exp $
* $Id: nodes.h,v 1.
20 1997/12/18 12:54:36 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,7 +29,6 @@ typedef enum NodeTag
*---------------------
*/
T_Plan
=
10
,
T_Existential
,
T_Result
,
T_Append
,
T_Scan
,
...
...
src/include/nodes/plannodes.h
View file @
6a45941f
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: plannodes.h,v 1.1
0 1997/09/08 21:52:53
momjian Exp $
* $Id: plannodes.h,v 1.1
1 1997/12/18 12:54:37
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -23,7 +23,6 @@
*
* control nodes
*
* Existential ExistentialState exstate;
* Result ResultState resstate;
* Append AppendState unionstate;
*
...
...
@@ -100,12 +99,6 @@ typedef struct Plan
when passed around generically in the executor */
/* ----------------
* existential node
* ----------------
*/
typedef
Plan
Existential
;
/* ----------------
* result node -
* returns tuples from outer plan that satisfy the qualifications
...
...
src/include/optimizer/planmain.h
View file @
6a45941f
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: planmain.h,v 1.
7 1997/12/18 12:21:02
momjian Exp $
* $Id: planmain.h,v 1.
8 1997/12/18 12:54:41
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -37,8 +37,6 @@ extern Agg *make_agg(List *tlist, int nagg, Aggreg **aggs, Plan *lefttree);
extern
Group
*
make_group
(
List
*
tlist
,
bool
tuplePerGroup
,
int
ngrp
,
AttrNumber
*
grpColIdx
,
Sort
*
lefttree
);
extern
Unique
*
make_unique
(
List
*
tlist
,
Plan
*
lefttree
,
char
*
uniqueAttr
);
extern
List
*
generate_fjoin
(
List
*
tlist
);
/*
* prototypes for plan/initsplan.c
...
...
src/include/optimizer/prep.h
View file @
6a45941f
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: prep.h,v 1.
7 1997/11/21 18:12:33
momjian Exp $
* $Id: prep.h,v 1.
8 1997/12/18 12:54:45
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -19,9 +19,6 @@
/*
* prototypes for prepqual.h
*/
extern
List
*
preprocess_qualification
(
Expr
*
qual
,
List
*
tlist
,
List
**
existentialQualPtr
);
extern
List
*
cnfify
(
Expr
*
qual
,
bool
removeAndFlag
);
/*
...
...
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