Commit 3ad406bb authored by Bruce Momjian's avatar Bruce Momjian

Rename internal variables DBName|dbName to dbname, for consistency.

parent 77a0219a
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.153 2003/05/06 04:16:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.154 2003/05/06 05:15:45 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -220,7 +220,7 @@ BootstrapMain(int argc, char *argv[]) ...@@ -220,7 +220,7 @@ BootstrapMain(int argc, char *argv[])
*/ */
{ {
int i; int i;
char *dbName; char *dbname;
int flag; int flag;
int xlogop = BS_XLOG_NOP; int xlogop = BS_XLOG_NOP;
char *potential_DataDir = NULL; char *potential_DataDir = NULL;
...@@ -244,7 +244,7 @@ BootstrapMain(int argc, char *argv[]) ...@@ -244,7 +244,7 @@ BootstrapMain(int argc, char *argv[])
*/ */
/* Set defaults, to be overriden by explicit options below */ /* Set defaults, to be overriden by explicit options below */
dbName = NULL; dbname = NULL;
if (!IsUnderPostmaster /* when exec || ExecBackend*/) if (!IsUnderPostmaster /* when exec || ExecBackend*/)
{ {
InitializeGUCOptions(); InitializeGUCOptions();
...@@ -297,9 +297,9 @@ BootstrapMain(int argc, char *argv[]) ...@@ -297,9 +297,9 @@ BootstrapMain(int argc, char *argv[])
if (argc - optind != 1) if (argc - optind != 1)
usage(); usage();
dbName = argv[optind]; dbname = argv[optind];
Assert(dbName); Assert(dbname);
if (IsUnderPostmaster && ExecBackend && MyProc /* ordinary backend */) if (IsUnderPostmaster && ExecBackend && MyProc /* ordinary backend */)
{ {
...@@ -426,7 +426,7 @@ BootstrapMain(int argc, char *argv[]) ...@@ -426,7 +426,7 @@ BootstrapMain(int argc, char *argv[])
/* /*
* backend initialization * backend initialization
*/ */
InitPostgres(dbName, NULL); InitPostgres(dbname, NULL);
for (i = 0; i < MAXATTR; i++) for (i = 0; i < MAXATTR; i++)
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.334 2003/05/06 04:16:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.335 2003/05/06 05:15:45 momjian Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
...@@ -1748,7 +1748,7 @@ int ...@@ -1748,7 +1748,7 @@ int
PostgresMain(int argc, char *argv[], const char *username) PostgresMain(int argc, char *argv[], const char *username)
{ {
int flag; int flag;
const char *DBName = NULL; const char *dbname = NULL;
char *potential_DataDir = NULL; char *potential_DataDir = NULL;
bool secure; bool secure;
int errs = 0; int errs = 0;
...@@ -1987,7 +1987,7 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -1987,7 +1987,7 @@ PostgresMain(int argc, char *argv[], const char *username)
*/ */
if (secure) if (secure)
{ {
DBName = strdup(optarg); dbname = strdup(optarg);
secure = false; /* subsequent switches are NOT secure = false; /* subsequent switches are NOT
* secure */ * secure */
ctx = PGC_BACKEND; ctx = PGC_BACKEND;
...@@ -2238,7 +2238,7 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2238,7 +2238,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if (IsUnderPostmaster) if (IsUnderPostmaster)
{ {
/* noninteractive case: nothing should be left after switches */ /* noninteractive case: nothing should be left after switches */
if (errs || argc != optind || DBName == NULL) if (errs || argc != optind || dbname == NULL)
{ {
elog(WARNING, "%s: invalid command line arguments\nTry -? for help.", elog(WARNING, "%s: invalid command line arguments\nTry -? for help.",
argv[0]); argv[0]);
...@@ -2260,8 +2260,8 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2260,8 +2260,8 @@ PostgresMain(int argc, char *argv[], const char *username)
proc_exit(1); proc_exit(1);
} }
else if (argc - optind == 1) else if (argc - optind == 1)
DBName = argv[optind]; dbname = argv[optind];
else if ((DBName = username) == NULL) else if ((dbname = username) == NULL)
{ {
elog(WARNING, "%s: user name undefined and no database specified", elog(WARNING, "%s: user name undefined and no database specified",
argv[0]); argv[0]);
...@@ -2322,7 +2322,7 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2322,7 +2322,7 @@ PostgresMain(int argc, char *argv[], const char *username)
* that involves database access should be there, not here. * that involves database access should be there, not here.
*/ */
elog(DEBUG2, "InitPostgres"); elog(DEBUG2, "InitPostgres");
InitPostgres(DBName, username); InitPostgres(dbname, username);
SetProcessingMode(NormalProcessing); SetProcessingMode(NormalProcessing);
...@@ -2344,7 +2344,7 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2344,7 +2344,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if (!IsUnderPostmaster) if (!IsUnderPostmaster)
{ {
puts("\nPOSTGRES backend interactive interface "); puts("\nPOSTGRES backend interactive interface ");
puts("$Revision: 1.334 $ $Date: 2003/05/06 04:16:35 $\n"); puts("$Revision: 1.335 $ $Date: 2003/05/06 05:15:45 $\n");
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment