diff options
author | Bruce Momjian <bruce@momjian.us> | 1999-12-10 03:56:14 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1999-12-10 03:56:14 +0000 |
commit | 97dec77fab612cfa285f6bd3dd5463a0d55526b2 (patch) | |
tree | d4a9f4754c2f720820f9dbfd9f392ba76301415d /src/backend/commands/dbcommands.c | |
parent | f6baabcd0bf227069423acf3ce767ad5701262ea (diff) | |
download | postgresql-97dec77fab612cfa285f6bd3dd5463a0d55526b2.tar.gz postgresql-97dec77fab612cfa285f6bd3dd5463a0d55526b2.zip |
Rename several destroy* functions/tags to drop*.
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r-- | src/backend/commands/dbcommands.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 26f7bcf71b8..d061b15b78d 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -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) |