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

Commit58e9267

Browse files
author
Thomas G. Lockhart
committed
Check for bad result from pg_id. A bad result can come from shared library
trouble, and the name of the shared library has been changed recently. Had to rerun ldconfig on my machine to get it working again.Give an error message with a helpful hint if so...
1 parentc7fe254 commit58e9267

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎src/bin/initdb/initdb.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.45 1998/08/01 22:57:41 momjian Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.46 1998/08/14 16:05:51 thomas Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -240,6 +240,14 @@ fi
240240

241241
POSTGRES_SUPERUID=`pg_id$POSTGRES_SUPERUSERNAME`
242242

243+
if [${POSTGRES_SUPERUID:=-1}-eq -1 ];then
244+
echo"Unable to determine a valid username. If you are running"
245+
echo"initdb without an explicit username specified, then there"
246+
echo"may be a problem with finding the Postgres shared library"
247+
echo"and/or the pg_id utility."
248+
exit 10
249+
fi
250+
243251
if [$POSTGRES_SUPERUID= NOUSER ];then
244252
echo"Valid username not given. You must specify the username for"
245253
echo"the Postgres superuser for the database system you are"
@@ -274,7 +282,7 @@ if [ -f "$PGDATA/PG_VERSION" ]; then
274282
echo"database system already exists."
275283
echo
276284
echo"If you want to create a new database system, either remove"
277-
echo"the$PGDATA directory or run initdb with a --pgdata option"
285+
echo"thedirectory$PGDATA or run initdb with a --pgdata option"
278286
echo"other than$PGDATA."
279287
exit 1
280288
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp