1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Rename several destroy* functions/tags to drop*.

This commit is contained in:
Bruce Momjian
1999-12-10 03:56:14 +00:00
parent f6baabcd0b
commit 97dec77fab
36 changed files with 133 additions and 133 deletions

View File

@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.47 1999/11/22 17:56:00 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.48 1999/12/10 03:55:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -151,7 +151,7 @@ cluster(char *oldrelname, char *oldindexname)
/* Destroy old heap (along with its index) and rename new. */
heap_destroy_with_catalog(oldrelname);
heap_drop_with_catalog(oldrelname);
CommitTransactionCommand();
StartTransactionCommand();

View File

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

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.52 1999/11/22 17:56:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.53 1999/12/10 03:55:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -214,7 +214,7 @@ void
RemoveRelation(char *name)
{
AssertArg(name);
heap_destroy_with_catalog(name);
heap_drop_with_catalog(name);
}
/*

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.45 1999/11/24 16:52:32 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.46 1999/12/10 03:55:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -85,7 +85,7 @@ createdb(char *dbname, char *dbpath, int encoding, CommandDest dest)
}
void
destroydb(char *dbname, CommandDest dest)
dropdb(char *dbname, CommandDest dest)
{
int4 user_id;
Oid db_id;
@@ -101,7 +101,7 @@ destroydb(char *dbname, CommandDest dest)
* If this call returns, the database exists and we're allowed to
* remove it.
*/
check_permissions("destroydb", dbpath, dbname, &db_id, &user_id);
check_permissions("dropdb", dbpath, dbname, &db_id, &user_id);
/* do as much checking as we can... */
if (!OidIsValid(db_id))
@@ -308,13 +308,13 @@ check_permissions(char *command,
elog(ERROR, "createdb: database '%s' already exists", dbname);
}
else if (!dbfound && !strcmp(command, "destroydb"))
else if (!dbfound && !strcmp(command, "dropdb"))
{
elog(ERROR, "destroydb: database '%s' does not exist", dbname);
elog(ERROR, "dropdb: database '%s' does not exist", dbname);
}
else if (dbfound && !strcmp(command, "destroydb")
else if (dbfound && !strcmp(command, "dropdb")
&& dbowner != *userIdP && use_super == false)
{
@@ -322,7 +322,7 @@ check_permissions(char *command,
}
if (dbfound && !strcmp(command, "destroydb"))
if (dbfound && !strcmp(command, "dropdb"))
strcpy(dbpath, path);
} /* check_permissions() */
@@ -331,7 +331,7 @@ check_permissions(char *command,
*
* This is currently dead code, since we don't *have* vacuum daemons.
* If you want to re-enable it, think about the interlock against deleting
* a database out from under running backends, in destroydb() above.
* a database out from under running backends, in dropdb() above.
*/
static void
stop_vacuum(char *dbpath, char *dbname)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.14 1999/11/22 17:56:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.15 1999/12/10 03:55:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -564,5 +564,5 @@ RemoveIndex(char *name)
((Form_pg_class) GETSTRUCT(tuple))->relkind);
}
index_destroy(tuple->t_data->t_oid);
index_drop(tuple->t_data->t_oid);
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.40 1999/11/22 17:56:02 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.41 1999/12/10 03:55:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -234,7 +234,7 @@ AttributeAndRelationRemove(Oid typeOid)
char *name;
name = NameStr(((Form_pg_class) GETSTRUCT(tup))->relname);
heap_destroy_with_catalog(name);
heap_drop_with_catalog(name);
}
heap_endscan(scan);
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.129 1999/12/01 00:29:54 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.130 1999/12/10 03:55:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -218,7 +218,7 @@ vc_shutdown()
/*
* Release our portal for cross-transaction memory.
*/
PortalDestroy(&vc_portal);
PortalDrop(&vc_portal);
/* okay, we're done */
VacuumRunning = false;
@@ -230,13 +230,13 @@ vc_shutdown()
void
vc_abort()
{
/* Clear flag first, to avoid recursion if PortalDestroy elog's */
/* Clear flag first, to avoid recursion if PortalDrop elog's */
VacuumRunning = false;
/*
* Release our portal for cross-transaction memory.
*/
PortalDestroy(&vc_portal);
PortalDrop(&vc_portal);
}
/*

View File

@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: view.c,v 1.39 1999/10/07 04:23:00 tgl Exp $
* $Id: view.c,v 1.40 1999/12/10 03:55:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -305,6 +305,6 @@ RemoveView(char *viewName)
/*
* now remove the relation.
*/
heap_destroy_with_catalog(viewName);
heap_drop_with_catalog(viewName);
pfree(rname);
}