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

Commitce3afcc

Browse files
committed
More optimizer cleanups.
1 parent18fbe41 commitce3afcc

File tree

9 files changed

+49
-39
lines changed

9 files changed

+49
-39
lines changed

‎src/backend/nodes/copyfuncs.c

Lines changed: 7 additions & 7 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.60 1999/02/0401:46:53 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.61 1999/02/0403:19:06 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1397,13 +1397,13 @@ _copyHashInfo(HashInfo *from)
13971397
}
13981398

13991399
/* ----------------
1400-
*_copyMInfo
1400+
*_copyMergeInfo
14011401
* ----------------
14021402
*/
1403-
staticMInfo*
1404-
_copyMInfo(MInfo*from)
1403+
staticMergeInfo*
1404+
_copyMergeInfo(MergeInfo*from)
14051405
{
1406-
MInfo*newnode=makeNode(MInfo);
1406+
MergeInfo*newnode=makeNode(MergeInfo);
14071407

14081408
/* ----------------
14091409
*copy remainder of node
@@ -1800,8 +1800,8 @@ copyObject(void *from)
18001800
caseT_HashInfo:
18011801
retval=_copyHashInfo(from);
18021802
break;
1803-
caseT_MInfo:
1804-
retval=_copyMInfo(from);
1803+
caseT_MergeInfo:
1804+
retval=_copyMergeInfo(from);
18051805
break;
18061806
caseT_JoinInfo:
18071807
retval=_copyJoinInfo(from);

‎src/backend/nodes/readfuncs.c

Lines changed: 2 additions & 2 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.47 1999/02/0401:46:54 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.48 1999/02/0403:19:06 momjian Exp $
1111
*
1212
* NOTES
1313
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -1914,7 +1914,7 @@ _readJoinMethod()
19141914
staticHashInfo*
19151915
_readHashInfo()
19161916
{
1917-
HashInfo*local_node;
1917+
HashInfo*local_node;
19181918
char*token;
19191919
intlength;
19201920

‎src/backend/optimizer/README

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Optimizer Functions
2+
-------------------
3+
14
These directories take the Query structure returned by the parser, and
25
generate a plan used by the executor. The /plan directory generates the
36
plan, the /path generates all possible ways to join the tables, and
@@ -93,9 +96,18 @@ planner()
9396

9497
Optimizer Structures
9598
--------------------
96-
RelOptInfo- info about every relation
97-
RestrictInfo- info about restrictions
98-
JoinInfo- info about join combinations
99-
Path- info about every way to access a relation(sequential, index)
100-
PathOrder - info about every ordering (sort, merge of relations)
99+
100+
RelOptInfo- Every relation
101+
102+
RestrictInfo- restriction clauses
103+
JoinInfo- join combinations
104+
105+
Path- every way to access a relation(sequential, index)
106+
IndexPath- index scans
107+
108+
JoinPath- joins
109+
MergePath- merge joins
110+
HashPath- hash joins
111+
112+
PathOrder- every ordering type (sort, merge of relations)
101113

‎src/backend/optimizer/path/hashutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.10 1999/02/0401:46:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.11 1999/02/0403:19:08 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -54,7 +54,7 @@ group_clauses_by_hashop(List *restrictinfo_list,
5454
*/
5555
if (hashjoinop)
5656
{
57-
HashInfo*xhashinfo= (HashInfo*)NULL;
57+
HashInfo*xhashinfo= (HashInfo*)NULL;
5858
Expr*clause=restrictinfo->clause;
5959
Var*leftop=get_leftop(clause);
6060
Var*rightop=get_rightop(clause);

‎src/backend/optimizer/path/joinpath.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.13 1999/02/0401:46:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.14 1999/02/0403:19:08 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -162,7 +162,6 @@ find_all_join_paths(Query *root, List *joinrels)
162162
temp_list=innerrel->pathlist;
163163
foreach(path,temp_list)
164164
{
165-
166165
/*
167166
* XXX
168167
*
@@ -235,7 +234,7 @@ sort_inner_and_outer(RelOptInfo * joinrel,
235234
List*mergeinfo_list)
236235
{
237236
List*ms_list=NIL;
238-
MInfo*xmergeinfo= (MInfo*)NULL;
237+
MergeInfo*xmergeinfo= (MergeInfo*)NULL;
239238
MergePath*temp_node= (MergePath*)NULL;
240239
List*i;
241240
List*outerkeys=NIL;
@@ -244,7 +243,7 @@ sort_inner_and_outer(RelOptInfo * joinrel,
244243

245244
foreach(i,mergeinfo_list)
246245
{
247-
xmergeinfo= (MInfo*)lfirst(i);
246+
xmergeinfo= (MergeInfo*)lfirst(i);
248247

249248
outerkeys=extract_path_keys(xmergeinfo->jmethod.jmkeys,
250249
outerrel->targetlist,
@@ -325,7 +324,7 @@ match_unsorted_outer(RelOptInfo * joinrel,
325324
List*clauses=NIL;
326325
List*matchedJoinKeys=NIL;
327326
List*matchedJoinClauses=NIL;
328-
MInfo*xmergeinfo= (MInfo*)NULL;
327+
MergeInfo*xmergeinfo= (MergeInfo*)NULL;
329328

330329
outerpath= (Path*)lfirst(i);
331330

@@ -465,7 +464,7 @@ match_unsorted_inner(RelOptInfo * joinrel,
465464

466465
foreach(i,innerpath_list)
467466
{
468-
MInfo*xmergeinfo= (MInfo*)NULL;
467+
MergeInfo*xmergeinfo= (MergeInfo*)NULL;
469468
List*clauses=NIL;
470469
List*matchedJoinKeys=NIL;
471470
List*matchedJoinClauses=NIL;
@@ -579,7 +578,7 @@ hash_inner_and_outer(RelOptInfo * joinrel,
579578
RelOptInfo*innerrel,
580579
List*hashinfo_list)
581580
{
582-
HashInfo*xhashinfo= (HashInfo*)NULL;
581+
HashInfo*xhashinfo= (HashInfo*)NULL;
583582
List*hjoin_list=NIL;
584583
HashPath*temp_node= (HashPath*)NULL;
585584
List*i=NIL;

‎src/backend/optimizer/path/mergeutils.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.11 1999/02/03 21:16:27 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.12 1999/02/04 03:19:09 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -53,7 +53,7 @@ group_clauses_by_order(List *restrictinfo_list,
5353
* if one does not yet exist for this merge ordering.
5454
*/
5555
PathOrderp_ordering;
56-
MInfo*xmergeinfo;
56+
MergeInfo*xmergeinfo;
5757
Expr*clause=restrictinfo->clause;
5858
Var*leftop=get_leftop(clause);
5959
Var*rightop=get_rightop(clause);
@@ -77,7 +77,7 @@ group_clauses_by_order(List *restrictinfo_list,
7777

7878
if (xmergeinfo==NULL)
7979
{
80-
xmergeinfo=makeNode(MInfo);
80+
xmergeinfo=makeNode(MergeInfo);
8181

8282
xmergeinfo->m_ordering=merge_ordering;
8383
mergeinfo_list=lcons(xmergeinfo,
@@ -102,15 +102,15 @@ group_clauses_by_order(List *restrictinfo_list,
102102
* Returns the node if it exists.
103103
*
104104
*/
105-
MInfo*
105+
MergeInfo*
106106
match_order_mergeinfo(PathOrder*ordering,List*mergeinfo_list)
107107
{
108108
MergeOrder*xmergeorder;
109109
List*xmergeinfo=NIL;
110110

111111
foreach(xmergeinfo,mergeinfo_list)
112112
{
113-
MInfo*mergeinfo= (MInfo*)lfirst(xmergeinfo);
113+
MergeInfo*mergeinfo= (MergeInfo*)lfirst(xmergeinfo);
114114

115115
xmergeorder=mergeinfo->m_ordering;
116116

@@ -123,5 +123,5 @@ match_order_mergeinfo(PathOrder *ordering, List *mergeinfo_list)
123123
returnmergeinfo;
124124
}
125125
}
126-
return (MInfo*)NIL;
126+
return (MergeInfo*)NIL;
127127
}

‎src/include/nodes/nodes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: nodes.h,v 1.37 1999/02/0401:47:00 momjian Exp $
9+
* $Id: nodes.h,v 1.38 1999/02/0403:19:10 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -82,7 +82,7 @@ typedef enum NodeTag
8282
T_RestrictInfo,
8383
T_JoinMethod,
8484
T_HashInfo,
85-
T_MInfo,
85+
T_MergeInfo,
8686
T_JoinInfo,
8787
T_Iter,
8888
T_Stream,

‎src/include/nodes/relation.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: relation.h,v 1.13 1999/02/0401:47:02 momjian Exp $
9+
* $Id: relation.h,v 1.14 1999/02/0403:19:10 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -47,7 +47,7 @@ typedef List *Relid;
4747
*leaves the tuples unordered)
4848
*cheapestpath -least expensive Path (regardless of final order)
4949
*pruneable - flag to let the planner know whether it can prune the plan
50-
*space of this RelOptInfo or not. -- JMH, 11/11/92
50+
*space of this RelOptInfo or not.
5151
*
5252
* * If the relation is a (secondary) index it will have the following
5353
*three fields:
@@ -157,8 +157,7 @@ typedef struct IndexPath
157157
Pathpath;
158158
List*indexid;
159159
List*indexqual;
160-
int*indexkeys;/* to transform heap attnos into index
161-
* ones */
160+
int*indexkeys;/* to transform heap attnos into index ones */
162161
}IndexPath;
163162

164163
typedefstructJoinPath
@@ -236,11 +235,11 @@ typedef struct HashInfo
236235
Oidhashop;
237236
}HashInfo;
238237

239-
typedefstructMInfo
238+
typedefstructMergeInfo
240239
{
241240
JoinMethodjmethod;
242241
MergeOrder*m_ordering;
243-
}MInfo;
242+
}MergeInfo;
244243

245244
typedefstructJoinInfo
246245
{

‎src/include/optimizer/paths.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: paths.h,v 1.11 1999/02/03 20:15:53 momjian Exp $
10+
* $Id: paths.h,v 1.12 1999/02/04 03:19:11 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -70,7 +70,7 @@ extern List *new_join_pathkeys(List *outer_pathkeys,
7070
*/
7171
externList*group_clauses_by_order(List*restrictinfo_list,
7272
intinner_relid);
73-
externMInfo*match_order_mergeinfo(PathOrder*ordering,
73+
externMergeInfo*match_order_mergeinfo(PathOrder*ordering,
7474
List*mergeinfo_list);
7575

7676
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp