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

Commitc0d17c7

Browse files
committed
JoinPath -> NestPath for nested loop.
1 parent3fdb9bb commitc0d17c7

File tree

20 files changed

+163
-169
lines changed

20 files changed

+163
-169
lines changed

‎src/backend/nodes/copyfuncs.c

Lines changed: 14 additions & 14 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.68 1999/02/1205:56:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.69 1999/02/1206:43:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1174,35 +1174,35 @@ _copyIndexPath(IndexPath *from)
11741174
}
11751175

11761176
/* ----------------
1177-
*CopyJoinPathFields
1177+
*CopyNestPathFields
11781178
*
1179-
*This function copies the fields of theJoinPath node. It is used by
1180-
*all the copy functions for classes which inherit fromJoinPath.
1179+
*This function copies the fields of theNestPath node. It is used by
1180+
*all the copy functions for classes which inherit fromNestPath.
11811181
* ----------------
11821182
*/
11831183
staticvoid
1184-
CopyJoinPathFields(JoinPath*from,JoinPath*newnode)
1184+
CopyNestPathFields(NestPath*from,NestPath*newnode)
11851185
{
11861186
Node_Copy(from,newnode,pathinfo);
11871187
Node_Copy(from,newnode,outerjoinpath);
11881188
Node_Copy(from,newnode,innerjoinpath);
11891189
}
11901190

11911191
/* ----------------
1192-
*_copyJoinPath
1192+
*_copyNestPath
11931193
* ----------------
11941194
*/
1195-
staticJoinPath*
1196-
_copyJoinPath(JoinPath*from)
1195+
staticNestPath*
1196+
_copyNestPath(NestPath*from)
11971197
{
1198-
JoinPath*newnode=makeNode(JoinPath);
1198+
NestPath*newnode=makeNode(NestPath);
11991199

12001200
/* ----------------
12011201
*copy the node superclass fields
12021202
* ----------------
12031203
*/
12041204
CopyPathFields((Path*)from, (Path*)newnode);
1205-
CopyJoinPathFields(from,newnode);
1205+
CopyNestPathFields(from,newnode);
12061206

12071207
returnnewnode;
12081208
}
@@ -1221,7 +1221,7 @@ _copyMergePath(MergePath *from)
12211221
* ----------------
12221222
*/
12231223
CopyPathFields((Path*)from, (Path*)newnode);
1224-
CopyJoinPathFields((JoinPath*)from, (JoinPath*)newnode);
1224+
CopyNestPathFields((NestPath*)from, (NestPath*)newnode);
12251225

12261226
/* ----------------
12271227
*copy the remainder of the node
@@ -1248,7 +1248,7 @@ _copyHashPath(HashPath *from)
12481248
* ----------------
12491249
*/
12501250
CopyPathFields((Path*)from, (Path*)newnode);
1251-
CopyJoinPathFields((JoinPath*)from, (JoinPath*)newnode);
1251+
CopyNestPathFields((NestPath*)from, (NestPath*)newnode);
12521252

12531253
/* ----------------
12541254
*copy remainder of node
@@ -1773,8 +1773,8 @@ copyObject(void *from)
17731773
caseT_IndexPath:
17741774
retval=_copyIndexPath(from);
17751775
break;
1776-
caseT_JoinPath:
1777-
retval=_copyJoinPath(from);
1776+
caseT_NestPath:
1777+
retval=_copyNestPath(from);
17781778
break;
17791779
caseT_MergePath:
17801780
retval=_copyMergePath(from);

‎src/backend/nodes/equalfuncs.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/nodes/equalfuncs.c,v 1.30 1999/02/11 14:58:48 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.31 1999/02/12 06:43:22 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -390,7 +390,7 @@ _equalIndexPath(IndexPath *a, IndexPath *b)
390390
}
391391

392392
staticbool
393-
_equalJoinPath(JoinPath*a,JoinPath*b)
393+
_equalNestPath(NestPath*a,NestPath*b)
394394
{
395395
Assert(IsA_JoinPath(a));
396396
Assert(IsA_JoinPath(b));
@@ -412,7 +412,7 @@ _equalMergePath(MergePath *a, MergePath *b)
412412
Assert(IsA(a,MergePath));
413413
Assert(IsA(b,MergePath));
414414

415-
if (!_equalJoinPath((JoinPath*)a, (JoinPath*)b))
415+
if (!_equalNestPath((NestPath*)a, (NestPath*)b))
416416
return false;
417417
if (!equal(a->path_mergeclauses,b->path_mergeclauses))
418418
return false;
@@ -429,7 +429,7 @@ _equalHashPath(HashPath *a, HashPath *b)
429429
Assert(IsA(a,HashPath));
430430
Assert(IsA(b,HashPath));
431431

432-
if (!_equalJoinPath((JoinPath*)a, (JoinPath*)b))
432+
if (!_equalNestPath((NestPath*)a, (NestPath*)b))
433433
return false;
434434
if (!equal((a->path_hashclauses), (b->path_hashclauses)))
435435
return false;
@@ -773,8 +773,8 @@ equal(void *a, void *b)
773773
caseT_IndexPath:
774774
retval=_equalIndexPath(a,b);
775775
break;
776-
caseT_JoinPath:
777-
retval=_equalJoinPath(a,b);
776+
caseT_NestPath:
777+
retval=_equalNestPath(a,b);
778778
break;
779779
caseT_MergePath:
780780
retval=_equalMergePath(a,b);

‎src/backend/nodes/freefuncs.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.8 1999/02/1205:56:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.9 1999/02/1206:43:23 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -811,33 +811,33 @@ _freeIndexPath(IndexPath *node)
811811
}
812812

813813
/* ----------------
814-
*FreeJoinPathFields
814+
*FreeNestPathFields
815815
*
816-
*This function frees the fields of theJoinPath node. It is used by
817-
*all the free functions for classes which inherit nodeJoinPath.
816+
*This function frees the fields of theNestPath node. It is used by
817+
*all the free functions for classes which inherit nodeNestPath.
818818
* ----------------
819819
*/
820820
staticvoid
821-
FreeJoinPathFields(JoinPath*node)
821+
FreeNestPathFields(NestPath*node)
822822
{
823823
freeObject(node->pathinfo);
824824
freeObject(node->outerjoinpath);
825825
freeObject(node->innerjoinpath);
826826
}
827827

828828
/* ----------------
829-
*_freeJoinPath
829+
*_freeNestPath
830830
* ----------------
831831
*/
832832
staticvoid
833-
_freeJoinPath(JoinPath*node)
833+
_freeNestPath(NestPath*node)
834834
{
835835
/* ----------------
836836
*free the node superclass fields
837837
* ----------------
838838
*/
839839
FreePathFields((Path*)node);
840-
FreeJoinPathFields(node);
840+
FreeNestPathFields(node);
841841

842842
pfree(node);
843843
}
@@ -854,7 +854,7 @@ _freeMergePath(MergePath *node)
854854
* ----------------
855855
*/
856856
FreePathFields((Path*)node);
857-
FreeJoinPathFields((JoinPath*)node);
857+
FreeNestPathFields((NestPath*)node);
858858

859859
/* ----------------
860860
*free the remainder of the node
@@ -879,7 +879,7 @@ _freeHashPath(HashPath *node)
879879
* ----------------
880880
*/
881881
FreePathFields((Path*)node);
882-
FreeJoinPathFields((JoinPath*)node);
882+
FreeNestPathFields((NestPath*)node);
883883

884884
/* ----------------
885885
*free remainder of node
@@ -1292,8 +1292,8 @@ freeObject(void *node)
12921292
caseT_IndexPath:
12931293
_freeIndexPath(node);
12941294
break;
1295-
caseT_JoinPath:
1296-
_freeJoinPath(node);
1295+
caseT_NestPath:
1296+
_freeNestPath(node);
12971297
break;
12981298
caseT_MergePath:
12991299
_freeMergePath(node);

‎src/backend/nodes/outfuncs.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: outfuncs.c,v 1.70 1999/02/1205:56:46 momjian Exp $
8+
* $Id: outfuncs.c,v 1.71 1999/02/1206:43:24 momjian Exp $
99
*
1010
* NOTES
1111
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -990,13 +990,13 @@ _outIndexPath(StringInfo str, IndexPath *node)
990990
}
991991

992992
/*
993-
*JoinPath is a subclass of Path
993+
*NestPath is a subclass of Path
994994
*/
995995
staticvoid
996-
_outJoinPath(StringInfostr,JoinPath*node)
996+
_outNestPath(StringInfostr,NestPath*node)
997997
{
998998
appendStringInfo(str,
999-
"JOINPATH :pathtype %d :cost %f :pathkeys ",
999+
"NESTPATH :pathtype %d :cost %f :pathkeys ",
10001000
node->path.pathtype,
10011001
node->path.path_cost);
10021002
_outNode(str,node->path.pathkeys);
@@ -1021,7 +1021,7 @@ _outJoinPath(StringInfo str, JoinPath *node)
10211021
}
10221022

10231023
/*
1024-
*MergePath is a subclass ofJoinPath.
1024+
*MergePath is a subclass ofNestPath.
10251025
*/
10261026
staticvoid
10271027
_outMergePath(StringInfostr,MergePath*node)
@@ -1061,7 +1061,7 @@ _outMergePath(StringInfo str, MergePath *node)
10611061
}
10621062

10631063
/*
1064-
*HashPath is a subclass ofJoinPath.
1064+
*HashPath is a subclass ofNestPath.
10651065
*/
10661066
staticvoid
10671067
_outHashPath(StringInfostr,HashPath*node)
@@ -1600,8 +1600,8 @@ _outNode(StringInfo str, void *obj)
16001600
caseT_IndexPath:
16011601
_outIndexPath(str,obj);
16021602
break;
1603-
caseT_JoinPath:
1604-
_outJoinPath(str,obj);
1603+
caseT_NestPath:
1604+
_outNestPath(str,obj);
16051605
break;
16061606
caseT_MergePath:
16071607
_outMergePath(str,obj);

‎src/backend/nodes/readfuncs.c

Lines changed: 11 additions & 11 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.55 1999/02/1205:56:46 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.56 1999/02/1206:43:24 momjian Exp $
1111
*
1212
* NOTES
1313
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -1564,20 +1564,20 @@ _readIndexPath()
15641564
}
15651565

15661566
/* ----------------
1567-
*_readJoinPath
1567+
*_readNestPath
15681568
*
1569-
*JoinPath is a subclass of Path
1569+
*NestPath is a subclass of Path
15701570
* ----------------
15711571
*/
1572-
staticJoinPath*
1573-
_readJoinPath()
1572+
staticNestPath*
1573+
_readNestPath()
15741574
{
1575-
JoinPath*local_node;
1575+
NestPath*local_node;
15761576
char*token;
15771577
intlength;
15781578

15791579

1580-
local_node=makeNode(JoinPath);
1580+
local_node=makeNode(NestPath);
15811581

15821582
token=lsptok(NULL,&length);/* get :pathtype */
15831583
token=lsptok(NULL,&length);/* now read it */
@@ -1630,7 +1630,7 @@ _readJoinPath()
16301630
/* ----------------
16311631
*_readMergePath
16321632
*
1633-
*MergePath is a subclass ofJoinPath.
1633+
*MergePath is a subclass ofNestPath.
16341634
* ----------------
16351635
*/
16361636
staticMergePath*
@@ -1704,7 +1704,7 @@ _readMergePath()
17041704
/* ----------------
17051705
*_readHashPath
17061706
*
1707-
*HashPath is a subclass ofJoinPath.
1707+
*HashPath is a subclass ofNestPath.
17081708
* ----------------
17091709
*/
17101710
staticHashPath*
@@ -2110,8 +2110,8 @@ parsePlanString(void)
21102110
return_value=_readPath();
21112111
elseif (!strncmp(token,"INDEXPATH",length))
21122112
return_value=_readIndexPath();
2113-
elseif (!strncmp(token,"JOINPATH",length))
2114-
return_value=_readJoinPath();
2113+
elseif (!strncmp(token,"NESTPATH",length))
2114+
return_value=_readNestPath();
21152115
elseif (!strncmp(token,"MERGEPATH",length))
21162116
return_value=_readMergePath();
21172117
elseif (!strncmp(token,"HASHPATH",length))

‎src/backend/optimizer/geqo/geqo_misc.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_misc.c,v 1.14 1999/02/10 21:02:34 momjian Exp $
8+
* $Id: geqo_misc.c,v 1.15 1999/02/12 06:43:26 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -158,7 +158,7 @@ void
158158
geqo_print_path(Query*root,Path*path,intindent)
159159
{
160160
char*ptype=NULL;
161-
JoinPath*jp;
161+
NestPath*jp;
162162
booljoin= false;
163163
inti;
164164

@@ -175,7 +175,7 @@ geqo_print_path(Query *root, Path *path, int indent)
175175
ptype="IdxScan";
176176
join= false;
177177
break;
178-
caseT_JoinPath:
178+
caseT_NestPath:
179179
ptype="Nestloop";
180180
join= true;
181181
break;
@@ -194,7 +194,7 @@ geqo_print_path(Query *root, Path *path, int indent)
194194
{
195195
intsize=path->parent->size;
196196

197-
jp= (JoinPath*)path;
197+
jp= (NestPath*)path;
198198
printf("%s size=%d cost=%f\n",ptype,size,path->path_cost);
199199
switch (nodeTag(path))
200200
{
@@ -203,8 +203,7 @@ geqo_print_path(Query *root, Path *path, int indent)
203203
for (i=0;i<indent+1;i++)
204204
printf("\t");
205205
printf(" clauses=(");
206-
geqo_print_joinclauses(root,
207-
((JoinPath*)path)->pathinfo);
206+
geqo_print_joinclauses(root, ((NestPath*)path)->pathinfo);
208207
printf(")\n");
209208

210209
if (nodeTag(path)==T_MergePath)

‎src/backend/optimizer/geqo/geqo_paths.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_paths.c,v 1.17 1999/02/1205:56:48 momjian Exp $
8+
* $Id: geqo_paths.c,v 1.18 1999/02/1206:43:26 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -98,7 +98,7 @@ geqo_prune_rel(RelOptInfo *rel, List *other_rels)
9898
void
9999
geqo_set_cheapest(RelOptInfo*rel)
100100
{
101-
JoinPath*cheapest= (JoinPath*)set_cheapest(rel,rel->pathlist);
101+
NestPath*cheapest= (NestPath*)set_cheapest(rel,rel->pathlist);
102102

103103
if (IsA_JoinPath(cheapest))
104104
rel->size=compute_joinrel_size(cheapest);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp