mirror of
https://github.com/postgres/postgres.git
synced 2025-11-01 21:31:19 +03:00
Hi,
I sending promised patch with:
* getopt_long() - for pg_dump (portable)
* and "Usage: " changes in scripts in src/bin/
- this changes are cosmetic only, not change any
feature ...etc.
All PostgreSQL routines (scripts) support now long options and
help's output is alike for all scripts and all support -? or --help.
Karel
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.3 1999/12/07 22:41:44 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.4 1999/12/16 20:10:02 momjian Exp $
|
||||
#
|
||||
# Note - this should NOT be setuid.
|
||||
#
|
||||
@@ -36,7 +36,6 @@ do
|
||||
case "$1" in
|
||||
--help|-\?)
|
||||
usage=t
|
||||
break
|
||||
;;
|
||||
# options passed on to psql
|
||||
--host|-h)
|
||||
@@ -96,11 +95,20 @@ do
|
||||
done
|
||||
|
||||
|
||||
# Help
|
||||
|
||||
if [ "$usage" ]; then
|
||||
echo "Usage: $CMDNAME [-h server] [-p port] [-i] [username]"
|
||||
exit 0
|
||||
echo ""
|
||||
echo "Usage: $CMDNAME [options] [username]"
|
||||
echo ""
|
||||
echo " -h HOSTNAME, --host=HOSTNAME "
|
||||
echo " -p PORT, --port=PORT "
|
||||
echo " -u USERNAME, --username=USERNAME (for connect to db)"
|
||||
echo " -W, --password "
|
||||
echo " -e, --echo "
|
||||
echo " -q, --quiet "
|
||||
echo " -i, --interactive "
|
||||
echo " -?, --help "
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Prompt for username if missing
|
||||
|
||||
Reference in New Issue
Block a user