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

Commitc445ba3

Browse files
committed
Rename heap_create to heap_create_and_catatlog, rename heap_creatr to heap_create().
1 parenta8926e0 commitc445ba3

File tree

11 files changed

+52
-50
lines changed

11 files changed

+52
-50
lines changed

‎src/backend/bootstrap/bootparse.y

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.7 1997/11/24 05:07:54 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.8 1997/11/28 04:39:25 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -170,18 +170,18 @@ CreateStmt:
170170
if (DebugMode)
171171
puts("creating bootstrap relation");
172172
tupdesc = CreateTupleDesc(numattr,attrtypes);
173-
reldesc =heap_creatr(LexIDStr($3), tupdesc);
173+
reldesc =heap_create(LexIDStr($3), tupdesc);
174174
if (DebugMode)
175175
puts("bootstrap relation created ok");
176176
}
177177
else
178178
{
179179
Oid id;
180180
TupleDesc tupdesc;
181-
/* extern Oidheap_create();*/
181+
/* extern Oidheap_create_and_catalog();*/
182182

183183
tupdesc = CreateTupleDesc(numattr,attrtypes);
184-
id =heap_create(LexIDStr($3), tupdesc);
184+
id =heap_create_and_catalog(LexIDStr($3), tupdesc);
185185
if (!Quiet)
186186
printf("CREATED relation %s with OID %d\n",
187187
LexIDStr($3), id);

‎src/backend/catalog/heap.c

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.37 1997/11/26 04:50:19 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.38 1997/11/28 04:39:34 momjian Exp $
1111
*
1212
* INTERFACE ROUTINES
13-
*heap_creatr()- Create an uncataloged heap relation
14-
*heap_create()- Create a cataloged relation
13+
*heap_create()- Create an uncataloged heap relation
14+
*heap_create_and_catalog()- Create a cataloged relation
1515
*heap_destroy()- Removes named relation from catalogs
1616
*
1717
* NOTES
1818
* this code taken from access/heap/create.c, which contains
19-
* the old heap_creater, amcreate, and amdestroy. those routines
20-
* will soon call these routines using the function manager,
19+
* the old heap_create_and_catalogr, amcreate, and amdestroy.
20+
* those routines will soon call these routines using the function
21+
* manager,
2122
* just like the poorly named "NewXXX" routines do.The
2223
* "New" routines are all going to die soon, once and for all!
2324
*-cim 1/13/91
@@ -148,7 +149,7 @@ static TempRelList *tempRels = NULL;
148149

149150

150151
/* ----------------------------------------------------------------
151-
*heap_creatr- Create an uncataloged heap relation
152+
*heap_create- Create an uncataloged heap relation
152153
*
153154
*Fields relpages, reltuples, reltuples, relkeys, relhistory,
154155
*relisindexed, and relkind of rdesc->rd_rel are initialized
@@ -160,12 +161,12 @@ static TempRelList *tempRels = NULL;
160161
*into the transaction context block.
161162
*
162163
*
163-
* ifheap_creatr is called with "" as the name, thenheap_creatr will create a
164-
* temporary name"temp_$RELOID" for the relation
164+
* ifheap_create is called with "" as the name, thenheap_create will create
165+
*atemporary name"temp_$RELOID" for the relation
165166
* ----------------------------------------------------------------
166167
*/
167168
Relation
168-
heap_creatr(char*name,
169+
heap_create(char*name,
169170
TupleDesctupDesc)
170171
{
171172
registerunsignedi;
@@ -331,7 +332,7 @@ heap_creatr(char *name,
331332

332333

333334
/* ----------------------------------------------------------------
334-
*heap_create- Create a cataloged relation
335+
*heap_create_and_catalog- Create a cataloged relation
335336
*
336337
*this is done in 6 steps:
337338
*
@@ -342,8 +343,8 @@ heap_creatr(char *name,
342343
* preforms a scan to ensure that no relation with the
343344
* same name already exists.
344345
*
345-
*3)heap_creater() is called to create the new relation on
346-
* disk.
346+
*3)heap_create_and_catalogr() is called to create the new relation
347+
*ondisk.
347348
*
348349
*4) TypeDefine() is called to define a new type corresponding
349350
* to the new relation.
@@ -375,8 +376,8 @@ heap_creatr(char *name,
375376
*create new relation
376377
*insert new relation into attribute catalog
377378
*
378-
*Should coordinate withheap_creater().Either it should
379-
*not be called or there should be a way to prevent
379+
*Should coordinate withheap_create_and_catalogr().Either
380+
*it shouldnot be called or there should be a way to prevent
380381
*the relation from being removed at the end of the
381382
*transaction if it is successful ('u'/'r' may be enough).
382383
*Also, if the transaction does not commit, then the
@@ -738,14 +739,14 @@ addNewRelationType(char *typeName, Oid new_rel_oid)
738739
}
739740

740741
/* --------------------------------
741-
*heap_create
742+
*heap_create_and_catalog
742743
*
743744
*creates a new cataloged relation. see comments above.
744745
* --------------------------------
745746
*/
746747
Oid
747-
heap_create(charrelname[],
748-
TupleDesctupdesc)
748+
heap_create_and_catalog(charrelname[],
749+
TupleDesctupdesc)
749750
{
750751
Relationpg_class_desc;
751752
Relationnew_rel_desc;
@@ -782,11 +783,11 @@ heap_create(char relname[],
782783
*create an uncataloged relation and pull its relation oid
783784
*from the newly formed relation descriptor.
784785
*
785-
*Note: The call toheap_creatr() does all the "real" work
786+
*Note: The call toheap_create() does all the "real" work
786787
*of creating the disk file for the relation.
787788
* ----------------
788789
*/
789-
new_rel_desc=heap_creatr(relname,tupdesc);
790+
new_rel_desc=heap_create(relname,tupdesc);
790791
new_rel_oid=new_rel_desc->rd_att->attrs[0]->attrelid;
791792

792793
/* ----------------

‎src/backend/catalog/index.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/catalog/index.c,v 1.30 1997/11/25 21:58:43 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.31 1997/11/28 04:39:38 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -1120,7 +1120,7 @@ index_create(char *heapRelationName,
11201120
*create the index relation
11211121
* ----------------
11221122
*/
1123-
indexRelation=heap_creatr(indexRelationName,
1123+
indexRelation=heap_create(indexRelationName,
11241124
indexTupDesc);
11251125

11261126
/* ----------------

‎src/backend/commands/cluster.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.17 1997/11/21 18:09:46 momjian Exp $
17+
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.18 1997/11/28 04:39:43 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -209,13 +209,13 @@ copy_heap(Oid OIDOldHeap)
209209
OldHeapDesc=RelationGetTupleDescriptor(OldHeap);
210210

211211
/*
212-
* Need to make a copy of the tuple descriptor,heap_create modifies
213-
* it.
212+
* Need to make a copy of the tuple descriptor,heap_create_and_catalog
213+
*modifiesit.
214214
*/
215215

216216
tupdesc=CreateTupleDescCopy(OldHeapDesc);
217217

218-
OIDNewHeap=heap_create(NewName,tupdesc);
218+
OIDNewHeap=heap_create_and_catalog(NewName,tupdesc);
219219

220220
if (!OidIsValid(OIDNewHeap))
221221
elog(WARN,"clusterheap: cannot create temporary heap relation\n");

‎src/backend/commands/creatinh.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/commands/Attic/creatinh.c,v 1.19 1997/11/21 18:09:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.20 1997/11/28 04:39:48 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -137,7 +137,7 @@ DefineRelation(CreateStmt *stmt)
137137
}
138138
}
139139

140-
relationId=heap_create(relname,descriptor);
140+
relationId=heap_create_and_catalog(relname,descriptor);
141141

142142
StoreCatalogInheritance(relationId,inheritList);
143143
}

‎src/backend/commands/recipe.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.13 1997/11/25 21:59:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.14 1997/11/28 04:39:53 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1047,7 +1047,8 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
10471047
len=length(q->qtrees[0]->targetList);
10481048
tupdesc=rel->rd_att;
10491049

1050-
relid=heap_create(child->nodeElem->outTypes->val[0],tupdesc);
1050+
relid=heap_create_and_catalog(
1051+
child->nodeElem->outTypes->val[0],tupdesc);
10511052
}
10521053
else
10531054
{
@@ -1071,8 +1072,8 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
10711072
}
10721073
else
10731074
{
1074-
relid=heap_create(child->nodeElem->outTypes->val[0],
1075-
tupdesc);
1075+
relid=heap_create_and_catalog(
1076+
child->nodeElem->outTypes->val[0],tupdesc);
10761077
}
10771078
}
10781079
}

‎src/backend/executor/execAmi.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/executor/execAmi.c,v 1.11 1997/11/27 02:23:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.12 1997/11/28 04:40:03 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -443,10 +443,10 @@ ExecCreatR(TupleDesc tupType,
443443
*/
444444

445445
/*
446-
*heap_creatr creates a name if the argument toheap_creatr is
446+
*heap_create creates a name if the argument toheap_create is
447447
* '\0 '
448448
*/
449-
relDesc=heap_creatr("",tupType);
449+
relDesc=heap_create("",tupType);
450450
}
451451
else
452452
{

‎src/backend/executor/execMain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* IDENTIFICATION
29-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.33 1997/11/24 05:08:20 momjian Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.34 1997/11/28 04:40:08 momjian Exp $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -572,7 +572,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
572572
/* fixup to prevent zero-length columns in create */
573573
setVarAttrLenForCreateTable(tupdesc,targetList,rangeTable);
574574

575-
intoRelationId=heap_create(intoName,tupdesc);
575+
intoRelationId=heap_create_and_catalog(intoName,tupdesc);
576576
#ifdefNOT_USED/* it's copy ... */
577577
resetVarAttrLenForCreateTable(tupdesc);
578578
#endif

‎src/backend/executor/nodeTee.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*ExecEndTee
1616
*
1717
* IDENTIFICATION
18-
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.11 1997/11/21 18:10:08 momjian Exp $
18+
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.12 1997/11/28 04:40:12 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -167,17 +167,17 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
167167
if (RelationIsValid(r))
168168
bufferRel=heap_openr(teeState->tee_bufferRelname);
169169
else
170-
bufferRel=heap_open(heap_create(teeState->tee_bufferRelname,
171-
tupType));
170+
bufferRel=heap_open(
171+
heap_create_and_catalog(teeState->tee_bufferRelname,tupType));
172172
}
173173
else
174174
{
175175
sprintf(teeState->tee_bufferRelname,
176176
"ttemp_%d",/* 'ttemp' for 'tee' temporary */
177177
newoid());
178178
/*bufferRel = ExecCreatR(len, tupType, _TEMP_RELATION_ID); */
179-
bufferRel=heap_open(heap_create(teeState->tee_bufferRelname,
180-
tupType));
179+
bufferRel=heap_open(
180+
heap_create_and_catalog(teeState->tee_bufferRelname,tupType));
181181
}
182182

183183
teeState->tee_bufferRel=bufferRel;

‎src/backend/storage/large_object/inv_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.22 1997/11/21 19:02:37 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.23 1997/11/28 04:40:28 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -139,7 +139,7 @@ inv_create(int flags)
139139
* be located on whatever storage manager the user requested.
140140
*/
141141

142-
heap_create(objname,tupdesc);
142+
heap_create_and_catalog(objname,tupdesc);
143143

144144
/* make the relation visible in this transaction */
145145
CommandCounterIncrement();

‎src/include/catalog/heap.h

Lines changed: 3 additions & 3 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: heap.h,v 1.8 1997/11/21 18:11:56 momjian Exp $
9+
* $Id: heap.h,v 1.9 1997/11/28 04:40:40 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -15,10 +15,10 @@
1515

1616
#include<utils/rel.h>
1717

18-
externRelationheap_creatr(char*relname,TupleDescatt);
18+
externRelationheap_create(char*relname,TupleDescatt);
1919

2020
externOid
21-
heap_create(charrelname[],TupleDesctupdesc);
21+
heap_create_and_catalog(charrelname[],TupleDesctupdesc);
2222

2323
externvoidheap_destroy(charrelname[]);
2424
externvoidheap_destroyr(Relationr);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp