Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6a45941

Browse files
committed
Remove Existential, and ifdef out generate_fjoin. Neither did anything.
1 parent4469eb6 commit6a45941

File tree

13 files changed

+26
-200
lines changed

13 files changed

+26
-200
lines changed

‎src/backend/executor/execTuples.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.12 1997/11/26 01:10:54 momjian Exp $
17+
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.13 1997/12/18 12:53:42 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -888,8 +888,6 @@ NodeGetResultTupleSlot(Plan *node)
888888
*the node's inner or outer subplan easily without having
889889
*to inspect the subplan.. -cim 10/16/89
890890
*
891-
*Assume that for existential nodes, we get the targetlist out
892-
*of the right node's targetlist
893891
* ----------------------------------------------------------------
894892
*/
895893

‎src/backend/nodes/copyfuncs.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.19 1997/12/1805:58:40 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.20 1997/12/1812:53:48 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -108,24 +108,6 @@ _copyPlan(Plan *from)
108108
}
109109

110110

111-
/* ----------------
112-
*_copyExistential
113-
* ----------------
114-
*/
115-
staticExistential*
116-
_copyExistential(Existential*from)
117-
{
118-
Existential*newnode=makeNode(Existential);
119-
120-
/* ----------------
121-
*copy node superclass fields
122-
* ----------------
123-
*/
124-
CopyPlanFields(from,newnode);
125-
126-
returnnewnode;
127-
}
128-
129111
/* ----------------
130112
*_copyResult
131113
* ----------------
@@ -1623,9 +1605,6 @@ copyObject(void *from)
16231605
caseT_Plan:
16241606
retval=_copyPlan(from);
16251607
break;
1626-
caseT_Existential:
1627-
retval=_copyExistential(from);
1628-
break;
16291608
caseT_Result:
16301609
retval=_copyResult(from);
16311610
break;

‎src/backend/nodes/outfuncs.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.11 1997/12/04 23:20:32 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.12 1997/12/18 12:53:51 momjian Exp $
1111
*
1212
* NOTES
1313
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -258,21 +258,6 @@ _outResult(StringInfo str, Result *node)
258258

259259
}
260260

261-
/*
262-
*Existential is a subclass of Plan.
263-
*/
264-
staticvoid
265-
_outExistential(StringInfostr,Existential*node)
266-
{
267-
charbuf[500];
268-
269-
sprintf(buf,"EXISTENTIAL");
270-
appendStringInfo(str,buf);
271-
_outPlanInfo(str, (Plan*)node);
272-
273-
274-
}
275-
276261
/*
277262
*Append is a subclass of Plan.
278263
*/
@@ -1641,9 +1626,6 @@ _outNode(StringInfo str, void *obj)
16411626
caseT_Result:
16421627
_outResult(str,obj);
16431628
break;
1644-
caseT_Existential:
1645-
_outExistential(str,obj);
1646-
break;
16471629
caseT_Append:
16481630
_outAppend(str,obj);
16491631
break;

‎src/backend/nodes/print.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.11 1997/11/25 21:59:44 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.12 1997/12/18 12:53:56 momjian Exp $
1111
*
1212
* HISTORY
1313
* AUTHORDATEMAJOR EVENT
@@ -304,9 +304,6 @@ plannode_type(Plan *p)
304304
caseT_Plan:
305305
return"PLAN";
306306
break;
307-
caseT_Existential:
308-
return"EXISTENTIAL";
309-
break;
310307
caseT_Result:
311308
return"RESULT";
312309
break;

‎src/backend/nodes/readfuncs.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.10 1997/10/25 01:09:30 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.11 1997/12/18 12:53:59 momjian Exp $
1111
*
1212
* NOTES
1313
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -217,24 +217,6 @@ _readResult()
217217
return (local_node);
218218
}
219219

220-
/* ----------------
221-
*_readExistential
222-
*
223-
*Existential nodes are only used by the planner.
224-
* ----------------
225-
*/
226-
staticExistential*
227-
_readExistential()
228-
{
229-
Existential*local_node;
230-
231-
local_node=makeNode(Existential);
232-
233-
_getPlan((Plan*)local_node);
234-
235-
return (local_node);
236-
}
237-
238220
/* ----------------
239221
*_readAppend
240222
*
@@ -1884,10 +1866,6 @@ parsePlanString(void)
18841866
{
18851867
return_value=_readResult();
18861868
}
1887-
elseif (!strncmp(token,"EXISTENTIAL",11))
1888-
{
1889-
return_value=_readExistential();
1890-
}
18911869
elseif (!strncmp(token,"APPEND",6))
18921870
{
18931871
return_value=_readAppend();

‎src/backend/optimizer/plan/createplan.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.19 1997/12/18 12:30:43 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.20 1997/12/18 12:54:04 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1175,10 +1175,10 @@ make_unique(List *tlist, Plan *lefttree, char *uniqueAttr)
11751175
return (node);
11761176
}
11771177

1178+
#ifdefNOT_USED
11781179
List*
11791180
generate_fjoin(List*tlist)
11801181
{
1181-
#if0
11821182
ListtlistP;
11831183
ListnewTlist=NIL;
11841184
ListfjoinList=NIL;
@@ -1227,6 +1227,7 @@ generate_fjoin(List *tlist)
12271227
newTlist=lappend(newTlist,tempList);
12281228
}
12291229
returnnewTlist;
1230-
#endif
12311230
returntlist;/* do nothing for now - ay 10/94 */
12321231
}
1232+
#endif
1233+

‎src/backend/optimizer/plan/planmain.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.10 1997/12/18 12:30:44 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.11 1997/12/18 12:54:09 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -259,7 +259,9 @@ query_planner(Query *root,
259259
* Destructively modify the query plan's targetlist to add fjoin lists
260260
* to flatten functions that return sets of base types
261261
*/
262+
#ifdefNOT_USED
262263
subplan->targetlist=generate_fjoin(subplan->targetlist);
264+
#endif
263265

264266
return (subplan);
265267
}
@@ -360,7 +362,9 @@ make_result(List *tlist,
360362
Result*node=makeNode(Result);
361363
Plan*plan=&node->plan;
362364

365+
#ifdefNOT_USED
363366
tlist=generate_fjoin(tlist);
367+
#endif
364368
plan->cost= (subplan ?subplan->cost :0);
365369
plan->state= (EState*)NULL;
366370
plan->targetlist=tlist;

‎src/backend/optimizer/plan/planner.c

Lines changed: 7 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.11 1997/11/25 21:59:59 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.12 1997/12/18 12:54:11 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -48,7 +48,6 @@
4848

4949
staticPlan*make_sortplan(List*tlist,List*sortcls,Plan*plannode);
5050
staticPlan*init_query_planner(Query*parse);
51-
staticExistential*make_existential(Plan*left,Plan*right);
5251

5352
/*****************************************************************************
5453
*
@@ -184,8 +183,7 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
184183

185184
/*
186185
* init-query-planner--
187-
* Deals with all non-union preprocessing, including existential
188-
* qualifications and CNFifying the qualifications.
186+
* Deals with all non-union preprocessing,and CNFifying the qualifications.
189187
*
190188
* Returns a query plan.
191189
* MODIFIES: tlist,qual
@@ -195,60 +193,19 @@ static Plan *
195193
init_query_planner(Query*root)
196194
{
197195
List*primary_qual;
198-
List*existential_qual;
199-
Existential*exist_plan;
200196
List*tlist=root->targetList;
201197

202198
tlist=preprocess_targetlist(tlist,
203199
root->commandType,
204200
root->resultRelation,
205201
root->rtable);
206202

207-
primary_qual=
208-
preprocess_qualification((Expr*)root->qual,
209-
tlist,
210-
&existential_qual);
203+
primary_qual=cnfify((Expr*)root->qual, true);
211204

212-
if (existential_qual==NULL)
213-
{
214-
return (query_planner(root,
215-
root->commandType,
216-
tlist,
217-
primary_qual));
218-
}
219-
else
220-
{
221-
inttemp=root->commandType;
222-
Plan*existential_plan;
223-
224-
root->commandType=CMD_SELECT;
225-
existential_plan=query_planner(root,
226-
temp,
227-
NIL,
228-
existential_qual);
229-
230-
exist_plan=make_existential(existential_plan,
231-
query_planner(root,
232-
root->commandType,
233-
tlist,
234-
primary_qual));
235-
return ((Plan*)exist_plan);
236-
}
237-
}
238-
239-
/*
240-
* make_existential--
241-
* Instantiates an existential plan node and fills in
242-
* the left and right subtree slots.
243-
*/
244-
staticExistential*
245-
make_existential(Plan*left,Plan*right)
246-
{
247-
Existential*node=makeNode(Existential);
248-
249-
node->lefttree=left;
250-
node->righttree=left;
251-
return (node);
205+
return (query_planner(root,
206+
root->commandType,
207+
tlist,
208+
primary_qual));
252209
}
253210

254211
/*

‎src/backend/optimizer/prep/prepqual.c

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.6 1997/09/08 21:45:31 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.7 1997/12/18 12:54:15 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -36,42 +36,6 @@ static List *qualcleanup(Expr *qual);
3636
staticList*remove_ands(Expr*qual);
3737
staticList*remove_duplicates(List*list);
3838

39-
/*
40-
* preprocess-qualification--
41-
* Driver routine for modifying the parse tree qualification.
42-
*
43-
* Returns the new base qualification and the existential qualification
44-
* in existentialQualPtr.
45-
*
46-
*XXX right now, update_clauses() does nothing so
47-
*preprocess-qualification simply converts the qual in conjunctive
48-
*normal form (see cnfify() below )
49-
*/
50-
List*
51-
preprocess_qualification(Expr*qual,List*tlist,List**existentialQualPtr)
52-
{
53-
List*cnf_qual=cnfify(qual, true);
54-
55-
/*
56-
List *existential_qual =
57-
update_clauses(intCons(_query_result_relation_,
58-
update_relations(tlist)),
59-
cnf_qual,
60-
_query_command_type_);
61-
if (existential_qual) {
62-
*existentialQualPtr = existential_qual;
63-
return set_difference(cnf_qual, existential_qual);
64-
} else {
65-
*existentialQualPtr = NIL;
66-
return cnf_qual;
67-
}
68-
*/
69-
/* update_clauses() is not working right now */
70-
*existentialQualPtr=NIL;
71-
returncnf_qual;
72-
73-
}
74-
7539
/*****************************************************************************
7640
*
7741
*CNF CONVERSION ROUTINES
@@ -607,27 +571,6 @@ remove_ands(Expr *qual)
607571
}
608572
}
609573

610-
/*****************************************************************************
611-
*
612-
*EXISTENTIAL QUALIFICATIONS
613-
*
614-
*****************************************************************************/
615-
616-
/*
617-
* update-relations--
618-
* Returns the range table indices (i.e., varnos) for all relations which
619-
* are referenced in the target list.
620-
*
621-
*/
622-
#ifdefNOT_USED
623-
staticList*
624-
update_relations(List*tlist)
625-
{
626-
return (NIL);
627-
}
628-
629-
#endif
630-
631574
/*****************************************************************************
632575
*
633576
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp