Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c0d17c7

Browse files
committed
JoinPath -> NestPath for nested loop.
1 parent 3fdb9bb commit c0d17c7

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/12 05:56:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.69 1999/02/12 06: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 the JoinPath node. It is used by
1180-
* all the copy functions for classes which inherit from JoinPath.
1179+
* This function copies the fields of the NestPath node. It is used by
1180+
* all the copy functions for classes which inherit from NestPath.
11811181
* ----------------
11821182
*/
11831183
static void
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-
static JoinPath *
1196-
_copyJoinPath(JoinPath *from)
1195+
static NestPath *
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
return newnode;
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
case T_IndexPath:
17741774
retval = _copyIndexPath(from);
17751775
break;
1776-
case T_JoinPath:
1777-
retval = _copyJoinPath(from);
1776+
case T_NestPath:
1777+
retval = _copyNestPath(from);
17781778
break;
17791779
case T_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
static bool
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
case T_IndexPath:
774774
retval = _equalIndexPath(a, b);
775775
break;
776-
case T_JoinPath:
777-
retval = _equalJoinPath(a, b);
776+
case T_NestPath:
777+
retval = _equalNestPath(a, b);
778778
break;
779779
case T_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/12 05:56:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.9 1999/02/12 06: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 the JoinPath node. It is used by
817-
* all the free functions for classes which inherit node JoinPath.
816+
* This function frees the fields of the NestPath node. It is used by
817+
* all the free functions for classes which inherit node NestPath.
818818
* ----------------
819819
*/
820820
static void
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
static void
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
case T_IndexPath:
12931293
_freeIndexPath(node);
12941294
break;
1295-
case T_JoinPath:
1296-
_freeJoinPath(node);
1295+
case T_NestPath:
1296+
_freeNestPath(node);
12971297
break;
12981298
case T_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/12 05:56:46 momjian Exp $
8+
* $Id: outfuncs.c,v 1.71 1999/02/12 06: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
static void
996-
_outJoinPath(StringInfo str, JoinPath *node)
996+
_outNestPath(StringInfo str, 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 of JoinPath.
1024+
* MergePath is a subclass of NestPath.
10251025
*/
10261026
static void
10271027
_outMergePath(StringInfo str, MergePath *node)
@@ -1061,7 +1061,7 @@ _outMergePath(StringInfo str, MergePath *node)
10611061
}
10621062

10631063
/*
1064-
* HashPath is a subclass of JoinPath.
1064+
* HashPath is a subclass of NestPath.
10651065
*/
10661066
static void
10671067
_outHashPath(StringInfo str, HashPath *node)
@@ -1600,8 +1600,8 @@ _outNode(StringInfo str, void *obj)
16001600
case T_IndexPath:
16011601
_outIndexPath(str, obj);
16021602
break;
1603-
case T_JoinPath:
1604-
_outJoinPath(str, obj);
1603+
case T_NestPath:
1604+
_outNestPath(str, obj);
16051605
break;
16061606
case T_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/12 05:56:46 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.56 1999/02/12 06: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-
static JoinPath *
1573-
_readJoinPath()
1572+
static NestPath *
1573+
_readNestPath()
15741574
{
1575-
JoinPath *local_node;
1575+
NestPath *local_node;
15761576
char *token;
15771577
int length;
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 of JoinPath.
1633+
* MergePath is a subclass of NestPath.
16341634
* ----------------
16351635
*/
16361636
static MergePath *
@@ -1704,7 +1704,7 @@ _readMergePath()
17041704
/* ----------------
17051705
* _readHashPath
17061706
*
1707-
* HashPath is a subclass of JoinPath.
1707+
* HashPath is a subclass of NestPath.
17081708
* ----------------
17091709
*/
17101710
static HashPath *
@@ -2110,8 +2110,8 @@ parsePlanString(void)
21102110
return_value = _readPath();
21112111
else if (!strncmp(token, "INDEXPATH", length))
21122112
return_value = _readIndexPath();
2113-
else if (!strncmp(token, "JOINPATH", length))
2114-
return_value = _readJoinPath();
2113+
else if (!strncmp(token, "NESTPATH", length))
2114+
return_value = _readNestPath();
21152115
else if (!strncmp(token, "MERGEPATH", length))
21162116
return_value = _readMergePath();
21172117
else if (!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, int indent)
159159
{
160160
char *ptype = NULL;
161-
JoinPath *jp;
161+
NestPath *jp;
162162
bool join = false;
163163
int i;
164164

@@ -175,7 +175,7 @@ geqo_print_path(Query *root, Path *path, int indent)
175175
ptype = "IdxScan";
176176
join = false;
177177
break;
178-
case T_JoinPath:
178+
case T_NestPath:
179179
ptype = "Nestloop";
180180
join = true;
181181
break;
@@ -194,7 +194,7 @@ geqo_print_path(Query *root, Path *path, int indent)
194194
{
195195
int size = 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/12 05:56:48 momjian Exp $
8+
* $Id: geqo_paths.c,v 1.18 1999/02/12 06: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)