Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b5d194

Browse files
committed
Minor coding cleanups.
1 parenta904181 commit0b5d194

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

‎src/backend/utils/init/postinit.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.77 2001/01/1221:54:00 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.78 2001/01/14 22:21:54 tgl Exp $
1212
*
1313
*
1414
*-------------------------------------------------------------------------
@@ -219,23 +219,17 @@ InitPostgres(const char *dbname, const char *username)
219219

220220
/* Verify if DataDir is ok */
221221
if (access(DataDir,F_OK)==-1)
222-
elog(FATAL,"Database system not found. Data directory '%s' does not exist.",
222+
elog(FATAL,"Database system not found.\n\t"
223+
"Data directory '%s' does not exist.",
223224
DataDir);
224225

225226
ValidatePgVersion(DataDir);
226227

227-
/*-----------------
228-
* Find oid and path of the database we're about to open. Since we're
229-
* not yet up and running we have to use the hackish GetRawDatabaseInfo.
230-
*
231-
* OLD COMMENTS:
232-
*The database's oid forms half of the unique key for the system
233-
*caches and lock tables. We therefore want it initialized before
234-
*we open any relations, since opening relations puts things in the
235-
*cache.To get around this problem, this code opens and scans the
236-
*pg_database relation by hand.
228+
/*
229+
* Find oid and path of the database we're about to open.
230+
* Since we're not yet up and running we have to use the hackish
231+
* GetRawDatabaseInfo.
237232
*/
238-
239233
GetRawDatabaseInfo(dbname,&MyDatabaseId,datpath);
240234

241235
if (!OidIsValid(MyDatabaseId))
@@ -248,13 +242,14 @@ InitPostgres(const char *dbname, const char *username)
248242
/* Verify the database path */
249243

250244
if (access(fullpath,F_OK)==-1)
251-
elog(FATAL,"Database \"%s\" does not exist. The data directory '%s' is missing.",
245+
elog(FATAL,"Database \"%s\" does not exist.\n\t"
246+
"The database subdirectory '%s' is missing.",
252247
dbname,fullpath);
253248

254249
ValidatePgVersion(fullpath);
255250

256251
if (chdir(fullpath)==-1)
257-
elog(FATAL,"Unable to change directory to '%s': %s",fullpath,strerror(errno));
252+
elog(FATAL,"Unable to change directory to '%s': %m",fullpath);
258253

259254
SetDatabasePath(fullpath);
260255
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp