aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-06-15 19:30:31 +0000
committerBruce Momjian <bruce@momjian.us>1998-06-15 19:30:31 +0000
commit6bd323c6b3f65b26273d5efb7ddd0ac04d039546 (patch)
tree6106db4e7512e765ca8c48963fb750cb63fec96f /src/backend/commands/dbcommands.c
parent27db9ecd0b15abca733a99dab3bf9771ad70507d (diff)
downloadpostgresql-6bd323c6b3f65b26273d5efb7ddd0ac04d039546.tar.gz
postgresql-6bd323c6b3f65b26273d5efb7ddd0ac04d039546.zip
Remove un-needed braces around single statements.
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r--src/backend/commands/dbcommands.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 40cdd4d94e1..2d4bdcb39b9 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.14 1998/06/04 17:26:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.15 1998/06/15 19:28:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,9 +68,7 @@ createdb(char *dbname, char *dbpath)
sprintf(loc, "%s%c%s", dbpath, SEP_CHAR, dbname);
}
else
- {
strcpy(loc, dbname);
- }
lp = ExpandDatabasePath(loc);
@@ -114,9 +112,7 @@ destroydb(char *dbname)
check_permissions("destroydb", dbpath, dbname, &db_id, &user_id);
if (!OidIsValid(db_id))
- {
elog(FATAL, "impossible: pg_database instance with invalid OID.");
- }
/* stop the vacuum daemon */
stop_vacuum(dbpath, dbname);
@@ -224,15 +220,11 @@ check_permissions(char *command,
/* Make sure we are not mucking with the template database */
if (!strcmp(dbname, "template1"))
- {
elog(ERROR, "%s cannot be executed on the template database.", command);
- }
/* Check to make sure database is not the currently open database */
if (!strcmp(dbname, DatabaseName))
- {
elog(ERROR, "%s cannot be executed on an open database", command);
- }
/* Check to make sure database is owned by this user */
@@ -272,9 +264,7 @@ check_permissions(char *command,
*(path + VARSIZE(dbtext) - VARHDRSZ) = '\0';
}
else
- {
*dbIdP = InvalidOid;
- }
heap_close(dbrel);
@@ -322,9 +312,7 @@ stop_vacuum(char *dbpath, char *dbname)
dbname, SEP_CHAR, dbname);
}
else
- {
sprintf(filename, "%s%c%s.vacuum", dbpath, SEP_CHAR, dbname);
- }
if ((fp = AllocateFile(filename, "r")) != NULL)
{