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

Commitf859c81

Browse files
committed
Rename Path.keys to Path.pathkeys. Too many 'keys' used for other things.
1 parent318e593 commitf859c81

File tree

22 files changed

+131
-129
lines changed

22 files changed

+131
-129
lines changed

‎src/backend/nodes/copyfuncs.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/copyfuncs.c,v 1.65 1999/02/09 17:02:46 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.66 1999/02/10 03:52:34 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1114,7 +1114,7 @@ CopyPathFields(Path *from, Path *newnode)
11141114
else
11151115
Node_Copy(from,newnode,path_order->ord.merge);
11161116

1117-
Node_Copy(from,newnode,keys);
1117+
Node_Copy(from,newnode,pathkeys);
11181118

11191119
newnode->outerjoincost=from->outerjoincost;
11201120

‎src/backend/nodes/equalfuncs.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/equalfuncs.c,v 1.27 1999/02/09 03:51:12 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.28 1999/02/10 03:52:35 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -366,7 +366,7 @@ _equalPath(Path *a, Path *b)
366366
if (!equal(a->path_order->ord.merge,b->path_order->ord.merge))
367367
return false;
368368
}
369-
if (!equal(a->keys,b->keys))
369+
if (!equal(a->pathkeys,b->pathkeys))
370370
return false;
371371

372372
/*

‎src/backend/nodes/freefuncs.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/Attic/freefuncs.c,v 1.4 1999/02/09 17:02:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.5 1999/02/10 03:52:35 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -767,7 +767,7 @@ FreePathFields(Path *node)
767767
pfree(node->path_order);/* is it an object, but we don't have
768768
separate free for it */
769769

770-
freeObject(node->keys);
770+
freeObject(node->pathkeys);
771771

772772
freeList(node->joinid);
773773
freeObject(node->loc_restrictinfo);

‎src/backend/nodes/outfuncs.c

Lines changed: 11 additions & 11 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.67 1999/02/09 17:02:49 momjian Exp $
8+
* $Id: outfuncs.c,v 1.68 1999/02/10 03:52:35 momjian Exp $
99
*
1010
* NOTES
1111
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -959,10 +959,10 @@ _outPathOrder(StringInfo str, PathOrder *node)
959959
staticvoid
960960
_outPath(StringInfostr,Path*node)
961961
{
962-
appendStringInfo(str," PATH :pathtype %d :cost %f :keys ",
962+
appendStringInfo(str," PATH :pathtype %d :cost %f :pathkeys ",
963963
node->pathtype,
964964
node->path_cost);
965-
_outNode(str,node->keys);
965+
_outNode(str,node->pathkeys);
966966

967967
appendStringInfo(str," :path_order ");
968968
_outNode(str,node->path_order);
@@ -975,10 +975,10 @@ static void
975975
_outIndexPath(StringInfostr,IndexPath*node)
976976
{
977977
appendStringInfo(str,
978-
" INDEXPATH :pathtype %d :cost %f :keys ",
978+
" INDEXPATH :pathtype %d :cost %f :pathkeys ",
979979
node->path.pathtype,
980980
node->path.path_cost);
981-
_outNode(str,node->path.keys);
981+
_outNode(str,node->path.pathkeys);
982982

983983
appendStringInfo(str," :path_order ");
984984
_outNode(str,node->path.path_order);
@@ -997,10 +997,10 @@ static void
997997
_outJoinPath(StringInfostr,JoinPath*node)
998998
{
999999
appendStringInfo(str,
1000-
" JOINPATH :pathtype %d :cost %f :keys ",
1000+
" JOINPATH :pathtype %d :cost %f :pathkeys ",
10011001
node->path.pathtype,
10021002
node->path.path_cost);
1003-
_outNode(str,node->path.keys);
1003+
_outNode(str,node->path.pathkeys);
10041004

10051005
appendStringInfo(str," :path_order ");
10061006
_outNode(str,node->path.path_order);
@@ -1028,10 +1028,10 @@ static void
10281028
_outMergePath(StringInfostr,MergePath*node)
10291029
{
10301030
appendStringInfo(str,
1031-
" MERGEPATH :pathtype %d :cost %f :keys ",
1031+
" MERGEPATH :pathtype %d :cost %f :pathkeys ",
10321032
node->jpath.path.pathtype,
10331033
node->jpath.path.path_cost);
1034-
_outNode(str,node->jpath.path.keys);
1034+
_outNode(str,node->jpath.path.pathkeys);
10351035

10361036
appendStringInfo(str," :path_order ");
10371037
_outNode(str,node->jpath.path.path_order);
@@ -1068,10 +1068,10 @@ static void
10681068
_outHashPath(StringInfostr,HashPath*node)
10691069
{
10701070
appendStringInfo(str,
1071-
" HASHPATH :pathtype %d :cost %f :keys ",
1071+
" HASHPATH :pathtype %d :cost %f :pathkeys ",
10721072
node->jpath.path.pathtype,
10731073
node->jpath.path.path_cost);
1074-
_outNode(str,node->jpath.path.keys);
1074+
_outNode(str,node->jpath.path.pathkeys);
10751075

10761076
appendStringInfo(str," :path_order ");
10771077
_outNode(str,node->jpath.path.path_order);

‎src/backend/nodes/print.c

Lines changed: 5 additions & 5 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.20 1999/02/09 17:02:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.21 1999/02/10 03:52:36 momjian Exp $
1111
*
1212
* HISTORY
1313
* AUTHORDATEMAJOR EVENT
@@ -212,16 +212,16 @@ print_expr(Node *expr, List *rtable)
212212
}
213213

214214
/*
215-
*print_keys -
216-
* temporary here. where is keys list oflist??
215+
*print_pathkeys -
216+
* temporary here. where is keys list oflists
217217
*/
218218
void
219-
print_keys(List*keys,List*rtable)
219+
print_pathkeys(List*pathkeys,List*rtable)
220220
{
221221
List*k;
222222

223223
printf("(");
224-
foreach(k,keys)
224+
foreach(k,pathkeys)
225225
{
226226
Node*var=lfirst((List*)lfirst(k));
227227

‎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.52 1999/02/09 17:02:50 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.53 1999/02/10 03:52:36 momjian Exp $
1111
*
1212
* NOTES
1313
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -1525,8 +1525,8 @@ _readPath()
15251525
token=lsptok(NULL,&length);/* get :path_order */
15261526
local_node->path_order=nodeRead(true);/* now read it */
15271527

1528-
token=lsptok(NULL,&length);/* get :keys */
1529-
local_node->keys=nodeRead(true);/* now read it */
1528+
token=lsptok(NULL,&length);/* get :pathkeys */
1529+
local_node->pathkeys=nodeRead(true);/* now read it */
15301530

15311531
returnlocal_node;
15321532
}
@@ -1557,8 +1557,8 @@ _readIndexPath()
15571557
token=lsptok(NULL,&length);/* get :path_order */
15581558
local_node->path.path_order=nodeRead(true);/* now read it */
15591559

1560-
token=lsptok(NULL,&length);/* get :keys */
1561-
local_node->path.keys=nodeRead(true);/* now read it */
1560+
token=lsptok(NULL,&length);/* get :pathkeys */
1561+
local_node->path.pathkeys=nodeRead(true);/* now read it */
15621562

15631563
token=lsptok(NULL,&length);/* get :indexid */
15641564
local_node->indexid=toIntList(nodeRead(true));
@@ -1596,8 +1596,8 @@ _readJoinPath()
15961596
token=lsptok(NULL,&length);/* get :path_order */
15971597
local_node->path.path_order=nodeRead(true);/* now read it */
15981598

1599-
token=lsptok(NULL,&length);/* get :keys */
1600-
local_node->path.keys=nodeRead(true);/* now read it */
1599+
token=lsptok(NULL,&length);/* get :pathkeys */
1600+
local_node->path.pathkeys=nodeRead(true);/* now read it */
16011601

16021602
token=lsptok(NULL,&length);/* get :pathinfo */
16031603
local_node->pathinfo=nodeRead(true);/* now read it */
@@ -1661,8 +1661,8 @@ _readMergePath()
16611661
token=lsptok(NULL,&length);/* get :path_order */
16621662
local_node->jpath.path.path_order=nodeRead(true);/* now read it */
16631663

1664-
token=lsptok(NULL,&length);/* get :keys */
1665-
local_node->jpath.path.keys=nodeRead(true);/* now read it */
1664+
token=lsptok(NULL,&length);/* get :pathkeys */
1665+
local_node->jpath.path.pathkeys=nodeRead(true);/* now read it */
16661666

16671667
token=lsptok(NULL,&length);/* get :pathinfo */
16681668
local_node->jpath.pathinfo=nodeRead(true);/* now read it */
@@ -1735,8 +1735,8 @@ _readHashPath()
17351735
token=lsptok(NULL,&length);/* get :path_order */
17361736
local_node->jpath.path.path_order=nodeRead(true);/* now read it */
17371737

1738-
token=lsptok(NULL,&length);/* get :keys */
1739-
local_node->jpath.path.keys=nodeRead(true);/* now read it */
1738+
token=lsptok(NULL,&length);/* get :pathkeys */
1739+
local_node->jpath.path.pathkeys=nodeRead(true);/* now read it */
17401740

17411741
token=lsptok(NULL,&length);/* get :pathinfo */
17421742
local_node->jpath.pathinfo=nodeRead(true);/* now read it */

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

Lines changed: 3 additions & 3 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.12 1999/02/03 20:15:27 momjian Exp $
8+
* $Id: geqo_misc.c,v 1.13 1999/02/10 03:52:37 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -240,8 +240,8 @@ geqo_print_path(Query *root, Path *path, int indent)
240240
List*k,
241241
*l;
242242

243-
printf("keys=");
244-
foreach(k,path->keys)
243+
printf("pathkeys=");
244+
foreach(k,path->pathkeys)
245245
{
246246
printf("(");
247247
foreach(l,lfirst(k))

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

Lines changed: 3 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/path/allpaths.c,v 1.25 1999/02/03 20:15:28 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.26 1999/02/10 03:52:38 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -383,8 +383,8 @@ print_path(Query *root, Path *path, int indent)
383383
List*k,
384384
*l;
385385

386-
printf("keys=");
387-
foreach(k,path->keys)
386+
printf("pathkeys=");
387+
foreach(k,path->pathkeys)
388388
{
389389
printf("(");
390390
foreach(l,lfirst(k))

‎src/backend/optimizer/path/costsize.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/costsize.c,v 1.27 1999/02/09 17:02:52 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.28 1999/02/10 03:52:39 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -164,7 +164,7 @@ cost_index(Oid indexid,
164164
* 2. the cost of reading the sort result into memory (another seqscan)
165165
* unless 'noread' is set
166166
*
167-
* 'keys' is a list of sort keys
167+
* 'pathkeys' is a list of sort keys
168168
* 'tuples' is the number of tuples in the relation
169169
* 'width' is the average tuple width in bytes
170170
* 'noread' is a flag indicating that the sort result can remain on disk
@@ -174,7 +174,7 @@ cost_index(Oid indexid,
174174
*
175175
*/
176176
Cost
177-
cost_sort(List*keys,inttuples,intwidth,boolnoread)
177+
cost_sort(List*pathkeys,inttuples,intwidth,boolnoread)
178178
{
179179
Costtemp=0;
180180
intnpages=page_size(tuples,width);
@@ -183,7 +183,7 @@ cost_sort(List *keys, int tuples, int width, bool noread)
183183

184184
if (!_enable_sort_)
185185
temp+=_disable_cost_;
186-
if (tuples==0||keys==NULL)
186+
if (tuples==0||pathkeys==NULL)
187187
{
188188
Assert(temp >=0);
189189
returntemp;
@@ -194,8 +194,8 @@ cost_sort(List *keys, int tuples, int width, bool noread)
194194
* could be base_log(pages, NBuffers), but we are only doing 2-way
195195
* merges
196196
*/
197-
temp+=_cpu_page_wight_*
198-
numTuples*base_log((double)pages, (double)2.0);
197+
temp+=_cpu_page_wight_*numTuples*
198+
base_log((double)pages, (double)2.0);
199199

200200
if (!noread)
201201
temp=temp+cost_seqscan(_NONAME_RELATION_ID_,npages,tuples);

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

Lines changed: 9 additions & 9 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.11 1999/02/04 03:19:08 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.12 1999/02/10 03:52:39 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -58,21 +58,21 @@ group_clauses_by_hashop(List *restrictinfo_list,
5858
Expr*clause=restrictinfo->clause;
5959
Var*leftop=get_leftop(clause);
6060
Var*rightop=get_rightop(clause);
61-
JoinKey*keys= (JoinKey*)NULL;
61+
JoinKey*joinkey= (JoinKey*)NULL;
6262

6363
xhashinfo=match_hashop_hashinfo(hashjoinop,hashinfo_list);
6464

6565
if (inner_relid==leftop->varno)
6666
{
67-
keys=makeNode(JoinKey);
68-
keys->outer=rightop;
69-
keys->inner=leftop;
67+
joinkey=makeNode(JoinKey);
68+
joinkey->outer=rightop;
69+
joinkey->inner=leftop;
7070
}
7171
else
7272
{
73-
keys=makeNode(JoinKey);
74-
keys->outer=leftop;
75-
keys->inner=rightop;
73+
joinkey=makeNode(JoinKey);
74+
joinkey->outer=leftop;
75+
joinkey->inner=rightop;
7676
}
7777

7878
if (xhashinfo==NULL)
@@ -90,7 +90,7 @@ group_clauses_by_hashop(List *restrictinfo_list,
9090

9191
xhashinfo->jmethod.clauses=lcons(clause,xhashinfo->jmethod.clauses);
9292

93-
xhashinfo->jmethod.jmkeys=lcons(keys,xhashinfo->jmethod.jmkeys);
93+
xhashinfo->jmethod.jmkeys=lcons(joinkey,xhashinfo->jmethod.jmkeys);
9494
}
9595
}
9696
returnhashinfo_list;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.40 1999/02/09 03:51:17 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.41 1999/02/10 03:52:39 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -144,7 +144,7 @@ find_index_paths(Query *root,
144144
* restriction clauses, then create pathnodes corresponding to
145145
* each group of usable clauses.
146146
*/
147-
scanclausegroups=group_clauses_by_indexkey(rel,
147+
scanclausegroups=group_clauses_by_indexkey(rel,
148148
index,
149149
index->indexkeys,
150150
index->classlist,
@@ -1293,7 +1293,7 @@ index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list,
12931293
pathnode->path.path_order=makeNode(PathOrder);
12941294
pathnode->path.path_order->ordtype=SORTOP_ORDER;
12951295
pathnode->path.path_order->ord.sortop=index->ordering;
1296-
pathnode->path.keys=NIL;/* not sure about this, bjm 1998/09/21 */
1296+
pathnode->path.pathkeys=NIL;
12971297

12981298
pathnode->indexid=index->relids;
12991299
pathnode->indexkeys=index->indexkeys;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp