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

Commit095d83e

Browse files
committed
Cleanup --alldb option handling.
1 parentd2cf8b4 commit095d83e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/bin/scripts/vacuumdb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
#
1313
# IDENTIFICATION
14-
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.6 1999/12/18 08:39:12 momjian Exp $
14+
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.7 1999/12/18 08:46:44 momjian Exp $
1515
#
1616
#-------------------------------------------------------------------------
1717

@@ -22,6 +22,7 @@ verbose=
2222
analyze=
2323
table=
2424
dbname=
25+
alldb=
2526

2627
while [$#-gt 0 ]
2728
do
@@ -86,7 +87,7 @@ do
8687
analyze="ANALYZE"
8788
;;
8889
--alldb|-a)
89-
dbname="`psql$PASSWDOPT$AUTHOPT$PGHOSTOPT$PGPORTOPT -q -t -A -d template1 -c'SELECT datname FROM pg_database'`"
90+
alldb=Y
9091
;;
9192
--table|-t)
9293
table="$2"
@@ -132,6 +133,10 @@ if [ "$usage" ]; then
132133
exit 1
133134
fi
134135

136+
if [!-z"$alldb" ];then
137+
dbname="`psql$PASSWDOPT$AUTHOPT$PGHOSTOPT$PGPORTOPT -q -t -A -d template1 -c'SELECT datname FROM pg_database'`"
138+
fi
139+
135140
if [-z"$dbname" ];then
136141
echo"$CMDNAME: Missing required argument database name. Try -? for help."
137142
exit 1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp