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

Commit 97dec77

Browse files
committed
Rename several destroy* functions/tags to drop*.
1 parent f6baabc commit 97dec77

File tree

36 files changed

+133
-133
lines changed

36 files changed

+133
-133
lines changed

src/backend/access/gist/gist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.47 1999/11/07 23:07:48 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.48 1999/12/10 03:55:42 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -264,7 +264,7 @@ gistbuild(Relation heap,
264264
if (pred != NULL || oldPred != NULL)
265265
{
266266
#ifndef OMIT_PARTIAL_INDEX
267-
ExecDestroyTupleTable(tupleTable, true);
267+
ExecDropTupleTable(tupleTable, true);
268268
pfree(econtext);
269269
#endif /* OMIT_PARTIAL_INDEX */
270270
}

src/backend/access/hash/hash.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/access/hash/hash.c,v 1.32 1999/09/24 00:23:48 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.33 1999/12/10 03:55:43 momjian Exp $
1111
*
1212
* NOTES
1313
* This file contains only the public interface routines.
@@ -221,7 +221,7 @@ hashbuild(Relation heap,
221221
if (pred != NULL || oldPred != NULL)
222222
{
223223
#ifndef OMIT_PARTIAL_INDEX
224-
ExecDestroyTupleTable(tupleTable, true);
224+
ExecDropTupleTable(tupleTable, true);
225225
pfree(econtext);
226226
#endif /* OMIT_PARTIAL_INDEX */
227227
}

src/backend/access/nbtree/nbtree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.49 1999/12/01 00:29:53 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.50 1999/12/10 03:55:44 momjian Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -269,7 +269,7 @@ btbuild(Relation heap,
269269
if (pred != NULL || oldPred != NULL)
270270
{
271271
#ifndef OMIT_PARTIAL_INDEX
272-
ExecDestroyTupleTable(tupleTable, true);
272+
ExecDropTupleTable(tupleTable, true);
273273
pfree(econtext);
274274
#endif /* OMIT_PARTIAL_INDEX */
275275
}

src/backend/access/rtree/rtree.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/access/rtree/Attic/rtree.c,v 1.40 1999/11/15 09:59:00 ishii Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.41 1999/12/10 03:55:45 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -240,7 +240,7 @@ rtbuild(Relation heap,
240240
if (pred != NULL || oldPred != NULL)
241241
{
242242
#ifndef OMIT_PARTIAL_INDEX
243-
ExecDestroyTupleTable(tupleTable, true);
243+
ExecDropTupleTable(tupleTable, true);
244244
pfree(econtext);
245245
#endif /* OMIT_PARTIAL_INDEX */
246246
}

src/backend/access/transam/xact.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/access/transam/xact.c,v 1.55 1999/09/29 16:05:55 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.56 1999/12/10 03:55:46 momjian Exp $
1111
*
1212
* NOTES
1313
* Transaction aborts can now occur two ways:
@@ -938,7 +938,7 @@ CommitTransaction()
938938
AtCommit_Notify();
939939

940940
CloseSequences();
941-
DestroyNoNameRels();
941+
DropNoNameRels();
942942
AtEOXact_portals();
943943
RecordTransactionCommit();
944944

@@ -1034,7 +1034,7 @@ AbortTransaction()
10341034
vc_abort();
10351035
RecordTransactionAbort();
10361036
RelationPurgeLocalRelation(false);
1037-
DestroyNoNameRels();
1037+
DropNoNameRels();
10381038
invalidate_temp_relations();
10391039
AtEOXact_nbtree();
10401040
AtAbort_Cache();

src/backend/catalog/heap.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.111 1999/11/28 02:03:04 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.112 1999/12/10 03:55:47 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
1414
* heap_create() - Create an uncataloged heap relation
1515
* heap_create_with_catalog() - Create a cataloged relation
16-
* heap_destroy_with_catalog() - Removes named relation from catalogs
16+
* heap_drop_with_catalog() - Removes named relation from catalogs
1717
*
1818
* NOTES
1919
* this code taken from access/heap/create.c, which contains
@@ -889,7 +889,7 @@ heap_create_with_catalog(char *relname,
889889

890890

891891
/* ----------------------------------------------------------------
892-
* heap_destroy_with_catalog - removes all record of named relation from catalogs
892+
* heap_drop_with_catalog - removes all record of named relation from catalogs
893893
*
894894
* 1) open relation, check for existence, etc.
895895
* 2) remove inheritance information
@@ -1046,7 +1046,7 @@ RelationRemoveIndexes(Relation relation)
10461046
&entry);
10471047

10481048
while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
1049-
index_destroy(((Form_pg_index) GETSTRUCT(tuple))->indexrelid);
1049+
index_drop(((Form_pg_index) GETSTRUCT(tuple))->indexrelid);
10501050

10511051
heap_endscan(scan);
10521052
heap_close(indexRelation, RowExclusiveLock);
@@ -1441,12 +1441,12 @@ DeleteTypeTuple(Relation rel)
14411441
}
14421442

14431443
/* --------------------------------
1444-
* heap_destroy_with_catalog
1444+
* heap_drop_with_catalog
14451445
*
14461446
* --------------------------------
14471447
*/
14481448
void
1449-
heap_destroy_with_catalog(char *relname)
1449+
heap_drop_with_catalog(char *relname)
14501450
{
14511451
Relation rel;
14521452
Oid rid;
@@ -1575,13 +1575,13 @@ heap_destroy_with_catalog(char *relname)
15751575
}
15761576

15771577
/*
1578-
* heap_destroy
1578+
* heap_drop
15791579
* destroy and close temporary relations
15801580
*
15811581
*/
15821582

15831583
void
1584-
heap_destroy(Relation rel)
1584+
heap_drop(Relation rel)
15851585
{
15861586
ReleaseRelationBuffers(rel);
15871587
if (!(rel->rd_isnoname) || !(rel->rd_unlinked))
@@ -1634,7 +1634,7 @@ InitNoNameRelList(void)
16341634
16351635
MODIFIES the global variable tempRels
16361636
we don't really remove it, just mark it as NULL
1637-
and DestroyNoNameRels will look for NULLs
1637+
and DropNoNameRels will look for NULLs
16381638
*/
16391639
static void
16401640
RemoveFromNoNameRelList(Relation r)
@@ -1679,7 +1679,7 @@ AddToNoNameRelList(Relation r)
16791679
go through the tempRels list and destroy each of the relations
16801680
*/
16811681
void
1682-
DestroyNoNameRels(void)
1682+
DropNoNameRels(void)
16831683
{
16841684
int i;
16851685
Relation rel;
@@ -1692,7 +1692,7 @@ DestroyNoNameRels(void)
16921692
rel = tempRels->rels[i];
16931693
/* rel may be NULL if it has been removed from the list already */
16941694
if (rel)
1695-
heap_destroy(rel);
1695+
heap_drop(rel);
16961696
}
16971697
free(tempRels->rels);
16981698
free(tempRels);

src/backend/catalog/index.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.98 1999/11/24 00:44:29 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.99 1999/12/10 03:55:48 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
1414
* index_create() - Create a cataloged index relation
15-
* index_destroy() - Removes index relation from catalogs
15+
* index_drop() - Removes index relation from catalogs
1616
*
1717
*
1818
*-------------------------------------------------------------------------
@@ -1103,12 +1103,12 @@ index_create(char *heapRelationName,
11031103

11041104
/* ----------------------------------------------------------------
11051105
*
1106-
* index_destroy
1106+
* index_drop
11071107
*
11081108
* ----------------------------------------------------------------
11091109
*/
11101110
void
1111-
index_destroy(Oid indexId)
1111+
index_drop(Oid indexId)
11121112
{
11131113
Relation userHeapRelation;
11141114
Relation userIndexRelation;
@@ -1213,7 +1213,7 @@ index_destroy(Oid indexId)
12131213
ReleaseRelationBuffers(userIndexRelation);
12141214

12151215
if (smgrunlink(DEFAULT_SMGR, userIndexRelation) != SM_SUCCESS)
1216-
elog(ERROR, "index_destroy: unlink: %m");
1216+
elog(ERROR, "index_drop: unlink: %m");
12171217

12181218
/*
12191219
* Close rels, but keep locks
@@ -1646,7 +1646,7 @@ DefaultBuild(Relation heapRelation,
16461646
if (predicate != NULL || oldPred != NULL)
16471647
{
16481648
/* parameter was 'false', almost certainly wrong --- tgl 9/21/99 */
1649-
ExecDestroyTupleTable(tupleTable, true);
1649+
ExecDropTupleTable(tupleTable, true);
16501650
}
16511651
#endif /* OMIT_PARTIAL_INDEX */
16521652

src/backend/commands/cluster.c

Lines changed: 2 additions & 2 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.47 1999/11/22 17:56:00 momjian Exp $
17+
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.48 1999/12/10 03:55:49 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -151,7 +151,7 @@ cluster(char *oldrelname, char *oldindexname)
151151

152152

153153
/* Destroy old heap (along with its index) and rename new. */
154-
heap_destroy_with_catalog(oldrelname);
154+
heap_drop_with_catalog(oldrelname);
155155

156156
CommitTransactionCommand();
157157
StartTransactionCommand();

src/backend/commands/command.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/command.c,v 1.58 1999/11/24 00:44:30 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.59 1999/12/10 03:55:49 momjian Exp $
1111
*
1212
* NOTES
1313
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -242,7 +242,7 @@ PerformPortalClose(char *name, CommandDest dest)
242242
* Note: PortalCleanup is called as a side-effect
243243
* ----------------
244244
*/
245-
PortalDestroy(&portal);
245+
PortalDrop(&portal);
246246
}
247247

248248
/* ----------------

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.52 1999/11/22 17:56:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.53 1999/12/10 03:55:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -214,7 +214,7 @@ void
214214
RemoveRelation(char *name)
215215
{
216216
AssertArg(name);
217-
heap_destroy_with_catalog(name);
217+
heap_drop_with_catalog(name);
218218
}
219219

220220
/*

src/backend/commands/dbcommands.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.45 1999/11/24 16:52:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.46 1999/12/10 03:55:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -85,7 +85,7 @@ createdb(char *dbname, char *dbpath, int encoding, CommandDest dest)
8585
}
8686

8787
void
88-
destroydb(char *dbname, CommandDest dest)
88+
dropdb(char *dbname, CommandDest dest)
8989
{
9090
int4 user_id;
9191
Oid db_id;
@@ -101,7 +101,7 @@ destroydb(char *dbname, CommandDest dest)
101101
* If this call returns, the database exists and we're allowed to
102102
* remove it.
103103
*/
104-
check_permissions("destroydb", dbpath, dbname, &db_id, &user_id);
104+
check_permissions("dropdb", dbpath, dbname, &db_id, &user_id);
105105

106106
/* do as much checking as we can... */
107107
if (!OidIsValid(db_id))
@@ -308,21 +308,21 @@ check_permissions(char *command,
308308
elog(ERROR, "createdb: database '%s' already exists", dbname);
309309

310310
}
311-
else if (!dbfound && !strcmp(command, "destroydb"))
311+
else if (!dbfound && !strcmp(command, "dropdb"))
312312
{
313313

314-
elog(ERROR, "destroydb: database '%s' does not exist", dbname);
314+
elog(ERROR, "dropdb: database '%s' does not exist", dbname);
315315

316316
}
317-
else if (dbfound && !strcmp(command, "destroydb")
317+
else if (dbfound && !strcmp(command, "dropdb")
318318
&& dbowner != *userIdP && use_super == false)
319319
{
320320

321321
elog(ERROR, "%s: database '%s' is not owned by you", command, dbname);
322322

323323
}
324324

325-
if (dbfound && !strcmp(command, "destroydb"))
325+
if (dbfound && !strcmp(command, "dropdb"))
326326
strcpy(dbpath, path);
327327
} /* check_permissions() */
328328

@@ -331,7 +331,7 @@ check_permissions(char *command,
331331
*
332332
* This is currently dead code, since we don't *have* vacuum daemons.
333333
* If you want to re-enable it, think about the interlock against deleting
334-
* a database out from under running backends, in destroydb() above.
334+
* a database out from under running backends, in dropdb() above.
335335
*/
336336
static void
337337
stop_vacuum(char *dbpath, char *dbname)

src/backend/commands/indexcmds.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/indexcmds.c,v 1.14 1999/11/22 17:56:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.15 1999/12/10 03:55:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -564,5 +564,5 @@ RemoveIndex(char *name)
564564
((Form_pg_class) GETSTRUCT(tuple))->relkind);
565565
}
566566

567-
index_destroy(tuple->t_data->t_oid);
567+
index_drop(tuple->t_data->t_oid);
568568
}

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.40 1999/11/22 17:56:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.41 1999/12/10 03:55:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -234,7 +234,7 @@ AttributeAndRelationRemove(Oid typeOid)
234234
char *name;
235235

236236
name = NameStr(((Form_pg_class) GETSTRUCT(tup))->relname);
237-
heap_destroy_with_catalog(name);
237+
heap_drop_with_catalog(name);
238238
}
239239
heap_endscan(scan);
240240
}

0 commit comments

Comments
 (0)