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

Commit002796b

Browse files
committed
Rename heap_destroyr to heap_destroy, heap_destroy to heap_destroy_with_catalog.
1 parentc445ba3 commit002796b

File tree

12 files changed

+47
-47
lines changed

12 files changed

+47
-47
lines changed

‎src/backend/bootstrap/bootparse.y‎

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/bootstrap/bootparse.y,v 1.8 1997/11/2804:39:25 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.9 1997/11/2817:26:43 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -178,10 +178,10 @@ CreateStmt:
178178
{
179179
Oid id;
180180
TupleDesc tupdesc;
181-
/* extern Oidheap_create_and_catalog();*/
181+
/* extern Oidheap_create_with_catalog();*/
182182

183183
tupdesc = CreateTupleDesc(numattr,attrtypes);
184-
id =heap_create_and_catalog(LexIDStr($3), tupdesc);
184+
id =heap_create_with_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: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.38 1997/11/2804:39:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.39 1997/11/2817:26:51 momjian Exp $
1111
*
1212
* INTERFACE ROUTINES
1313
*heap_create()- Create an uncataloged heap relation
14-
*heap_create_and_catalog() - Create a cataloged relation
15-
*heap_destroy()- Removes named relation from catalogs
14+
*heap_create_with_catalog() - Create a cataloged relation
15+
*heap_destroy_with_catalog()- Removes named relation from catalogs
1616
*
1717
* NOTES
1818
* this code taken from access/heap/create.c, which contains
19-
* the oldheap_create_and_catalogr, amcreate, and amdestroy.
19+
* the oldheap_create_with_catalogr, amcreate, and amdestroy.
2020
* those routines will soon call these routines using the function
2121
* manager,
2222
* just like the poorly named "NewXXX" routines do.The
@@ -332,7 +332,7 @@ heap_create(char *name,
332332

333333

334334
/* ----------------------------------------------------------------
335-
*heap_create_and_catalog- Create a cataloged relation
335+
*heap_create_with_catalog- Create a cataloged relation
336336
*
337337
*this is done in 6 steps:
338338
*
@@ -343,7 +343,7 @@ heap_create(char *name,
343343
* preforms a scan to ensure that no relation with the
344344
* same name already exists.
345345
*
346-
*3)heap_create_and_catalogr() is called to create the new relation
346+
*3)heap_create_with_catalogr() is called to create the new relation
347347
* on disk.
348348
*
349349
*4) TypeDefine() is called to define a new type corresponding
@@ -376,7 +376,7 @@ heap_create(char *name,
376376
*create new relation
377377
*insert new relation into attribute catalog
378378
*
379-
*Should coordinate withheap_create_and_catalogr().Either
379+
*Should coordinate withheap_create_with_catalogr().Either
380380
*it should not be called or there should be a way to prevent
381381
*the relation from being removed at the end of the
382382
*transaction if it is successful ('u'/'r' may be enough).
@@ -739,13 +739,13 @@ addNewRelationType(char *typeName, Oid new_rel_oid)
739739
}
740740

741741
/* --------------------------------
742-
*heap_create_and_catalog
742+
*heap_create_with_catalog
743743
*
744744
*creates a new cataloged relation. see comments above.
745745
* --------------------------------
746746
*/
747747
Oid
748-
heap_create_and_catalog(charrelname[],
748+
heap_create_with_catalog(charrelname[],
749749
TupleDesctupdesc)
750750
{
751751
Relationpg_class_desc;
@@ -830,7 +830,7 @@ heap_create_and_catalog(char relname[],
830830

831831

832832
/* ----------------------------------------------------------------
833-
*heap_destroy- removes all record of named relation from catalogs
833+
*heap_destroy_with_catalog- removes all record of named relation from catalogs
834834
*
835835
*1)open relation, check for existence, etc.
836836
*2)remove inheritance information
@@ -1246,12 +1246,12 @@ DeletePgTypeTuple(Relation rdesc)
12461246
}
12471247

12481248
/* --------------------------------
1249-
*heap_destroy
1249+
*heap_destroy_with_catalog
12501250
*
12511251
* --------------------------------
12521252
*/
12531253
void
1254-
heap_destroy(char*relname)
1254+
heap_destroy_with_catalog(char*relname)
12551255
{
12561256
Relationrdesc;
12571257
Oidrid;
@@ -1358,13 +1358,13 @@ heap_destroy(char *relname)
13581358
}
13591359

13601360
/*
1361-
*heap_destroyr
1361+
*heap_destroy
13621362
* destroy and close temporary relations
13631363
*
13641364
*/
13651365

13661366
void
1367-
heap_destroyr(Relationrdesc)
1367+
heap_destroy(Relationrdesc)
13681368
{
13691369
ReleaseRelationBuffers(rdesc);
13701370
if (!(rdesc->rd_istemp)|| !(rdesc->rd_tmpunlinked))
@@ -1475,7 +1475,7 @@ DestroyTempRels(void)
14751475
rdesc=tempRels->rels[i];
14761476
/* rdesc may be NULL if it has been removed from the list already */
14771477
if (rdesc)
1478-
heap_destroyr(rdesc);
1478+
heap_destroy(rdesc);
14791479
}
14801480
free(tempRels->rels);
14811481
free(tempRels);

‎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.18 1997/11/2804:39:43 momjian Exp $
17+
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.19 1997/11/2817:26:55 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -175,7 +175,7 @@ cluster(char oldrelname[], char oldindexname[])
175175

176176

177177
/* Destroy old heap (along with its index) and rename new. */
178-
heap_destroy(oldrelname);
178+
heap_destroy_with_catalog(oldrelname);
179179

180180
renamerel(NewHeapName,saveoldrelname);
181181
TypeRename(NewHeapName,saveoldrelname);
@@ -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_and_catalog
212+
* Need to make a copy of the tuple descriptor,heap_create_with_catalog
213213
* modifies it.
214214
*/
215215

216216
tupdesc=CreateTupleDescCopy(OldHeapDesc);
217217

218-
OIDNewHeap=heap_create_and_catalog(NewName,tupdesc);
218+
OIDNewHeap=heap_create_with_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: 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/commands/Attic/creatinh.c,v 1.20 1997/11/2804:39:48 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.21 1997/11/2817:27:04 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -137,7 +137,7 @@ DefineRelation(CreateStmt *stmt)
137137
}
138138
}
139139

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

142142
StoreCatalogInheritance(relationId,inheritList);
143143
}
@@ -157,7 +157,7 @@ void
157157
RemoveRelation(char*name)
158158
{
159159
AssertArg(name);
160-
heap_destroy(name);
160+
heap_destroy_with_catalog(name);
161161
}
162162

163163

‎src/backend/commands/recipe.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/commands/Attic/recipe.c,v 1.14 1997/11/2804:39:53 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.15 1997/11/2817:27:08 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1047,7 +1047,7 @@ 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_and_catalog(
1050+
relid=heap_create_with_catalog(
10511051
child->nodeElem->outTypes->val[0],tupdesc);
10521052
}
10531053
else
@@ -1072,7 +1072,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
10721072
}
10731073
else
10741074
{
1075-
relid=heap_create_and_catalog(
1075+
relid=heap_create_with_catalog(
10761076
child->nodeElem->outTypes->val[0],tupdesc);
10771077
}
10781078
}

‎src/backend/commands/remove.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/remove.c,v 1.17 1997/11/25 21:59:03 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.18 1997/11/28 17:27:10 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -241,7 +241,7 @@ AttributeAndRelationRemove(Oid typeOid)
241241
char*name;
242242

243243
name= (((Form_pg_class)GETSTRUCT(tup))->relname).data;
244-
heap_destroy(name);
244+
heap_destroy_with_catalog(name);
245245
}
246246
}
247247
heap_endscan(sdesc);

‎src/backend/commands/view.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/view.c,v 1.16 1997/11/25 21:59:12 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.17 1997/11/28 17:27:13 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -314,6 +314,6 @@ RemoveView(char *viewName)
314314
/*
315315
* now remove the relation.
316316
*/
317-
heap_destroy(viewName);
317+
heap_destroy_with_catalog(viewName);
318318
pfree(rname);
319319
}

‎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.34 1997/11/2804:40:08 momjian Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.35 1997/11/2817:27:20 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_and_catalog(intoName,tupdesc);
575+
intoRelationId=heap_create_with_catalog(intoName,tupdesc);
576576
#ifdefNOT_USED/* it's copy ... */
577577
resetVarAttrLenForCreateTable(tupdesc);
578578
#endif

‎src/backend/executor/nodeMaterial.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/executor/nodeMaterial.c,v 1.10 1997/11/20 23:21:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.11 1997/11/28 17:27:25 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -319,7 +319,7 @@ ExecEndMaterial(Material *node)
319319
matstate=node->matstate;
320320
tempRelation=matstate->mat_TempRelation;
321321

322-
heap_destroyr(tempRelation);
322+
heap_destroy(tempRelation);
323323

324324
/* ----------------
325325
*close the temp relation and shut down the scan.

‎src/backend/executor/nodeTee.c‎

Lines changed: 4 additions & 4 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.12 1997/11/2804:40:12 momjian Exp $
18+
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.13 1997/11/2817:27:31 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -168,7 +168,7 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
168168
bufferRel=heap_openr(teeState->tee_bufferRelname);
169169
else
170170
bufferRel=heap_open(
171-
heap_create_and_catalog(teeState->tee_bufferRelname,tupType));
171+
heap_create_with_catalog(teeState->tee_bufferRelname,tupType));
172172
}
173173
else
174174
{
@@ -177,7 +177,7 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
177177
newoid());
178178
/*bufferRel = ExecCreatR(len, tupType, _TEMP_RELATION_ID); */
179179
bufferRel=heap_open(
180-
heap_create_and_catalog(teeState->tee_bufferRelname,tupType));
180+
heap_create_with_catalog(teeState->tee_bufferRelname,tupType));
181181
}
182182

183183
teeState->tee_bufferRel=bufferRel;
@@ -519,7 +519,7 @@ ExecEndTee(Tee *node, Plan *parent)
519519
bufferRel=teeState->tee_bufferRel;
520520
if (bufferRel)
521521
{
522-
heap_destroyr(bufferRel);
522+
heap_destroy(bufferRel);
523523
teeState->tee_bufferRel=NULL;
524524
if (teeState->tee_mcxt)
525525
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp