Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
fbcc0d69
Commit
fbcc0d69
authored
Feb 18, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix param handling of create* admin scripts as described months ago.
Properly handles default values.
parent
c9361a7a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
17 deletions
+56
-17
doc/src/sgml/ref/vacuumdb.sgml
doc/src/sgml/ref/vacuumdb.sgml
+3
-3
src/bin/scripts/createdb
src/bin/scripts/createdb
+11
-5
src/bin/scripts/createlang.sh
src/bin/scripts/createlang.sh
+6
-1
src/bin/scripts/createuser
src/bin/scripts/createuser
+6
-1
src/bin/scripts/dropdb
src/bin/scripts/dropdb
+6
-1
src/bin/scripts/droplang
src/bin/scripts/droplang
+6
-1
src/bin/scripts/dropuser
src/bin/scripts/dropuser
+6
-1
src/bin/scripts/vacuumdb
src/bin/scripts/vacuumdb
+12
-4
No files found.
doc/src/sgml/ref/vacuumdb.sgml
View file @
fbcc0d69
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.2
0 2001/12/08 03:24:40 thomas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.2
1 2002/02/18 05:48:43 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -23,13 +23,13 @@ PostgreSQL documentation
<cmdsynopsis>
<command>vacuumdb</command>
<arg rep="repeat"><replaceable>connection-options</replaceable></arg>
<arg><arg>-d</arg> <replaceable>dbname</replaceable></arg>
<group><arg>--full</arg><arg>-f</arg></group>
<group><arg>--verbose</arg><arg>-v</arg></group>
<group><arg>--analyze</arg><arg>-z</arg></group>
<arg>--table '<replaceable>table</replaceable>
<arg>--table
| -t
'<replaceable>table</replaceable>
<arg>( <replaceable class="parameter">column</replaceable> [,...] )</arg>'
</arg>
<arg><replaceable>dbname</replaceable></arg>
<sbr>
<command>vacuumdb</command>
<arg rep="repeat"><replaceable>connection-options</replaceable></arg>
...
...
src/bin/scripts/createdb
View file @
fbcc0d69
...
...
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.1
8 2001/09/30 22:17:51
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.1
9 2002/02/18 05:48:44
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -104,11 +104,17 @@ do
exit
1
;;
*
)
if
[
-z
"
$dbname
"
]
;
then
dbname
=
"
$1
"
else
dbname
=
"
$1
"
if
[
"
$2
"
]
then
shift
dbcomment
=
"
$1
"
fi
if
[
"$#"
-ne
1
]
;
then
echo
"
$CMDNAME
: invalid option:
$2
"
1>&2
echo
"Try '
$CMDNAME
--help' for more information."
1>&2
exit
1
fi
;;
esac
shift
...
...
@@ -118,7 +124,7 @@ if [ "$usage" ]; then
echo
"
$CMDNAME
creates a PostgreSQL database."
echo
echo
"Usage:"
echo
"
$CMDNAME
[options]
dbname
[description]"
echo
"
$CMDNAME
[options]
[dbname]
[description]"
echo
echo
"Options:"
echo
" -D, --location=PATH Alternative place to store the database"
...
...
src/bin/scripts/createlang.sh
View file @
fbcc0d69
...
...
@@ -7,7 +7,7 @@
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.3
2 2002/01/03 05:30:0
4 momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.3
3 2002/02/18 05:48:4
4 momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -116,6 +116,11 @@ do
fi
else
dbname
=
"
$1
"
fi
if
[
"$#"
-ne
1
]
;
then
echo
"
$CMDNAME
: invalid option:
$2
"
1>&2
echo
"Try '
$CMDNAME
--help' for more information."
1>&2
exit
1
fi
;;
esac
shift
...
...
src/bin/scripts/createuser
View file @
fbcc0d69
...
...
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.2
2 2001/09/30 22:17:51
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.2
3 2002/02/18 05:48:44
momjian Exp $
#
# Note - this should NOT be setuid.
#
...
...
@@ -123,6 +123,11 @@ do
;;
*
)
NewUser
=
"
$1
"
if
[
"$#"
-ne
1
]
;
then
echo
"
$CMDNAME
: invalid option:
$2
"
1>&2
echo
"Try '
$CMDNAME
--help' for more information."
1>&2
exit
1
fi
;;
esac
shift
;
...
...
src/bin/scripts/dropdb
View file @
fbcc0d69
...
...
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.1
3 2001/09/30 22:17:51
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.1
4 2002/02/18 05:48:44
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -89,6 +89,11 @@ do
;;
*
)
dbname
=
"
$1
"
if
[
"$#"
-ne
1
]
;
then
echo
"
$CMDNAME
: invalid option:
$2
"
1>&2
echo
"Try '
$CMDNAME
--help' for more information."
1>&2
exit
1
fi
;;
esac
shift
...
...
src/bin/scripts/droplang
View file @
fbcc0d69
...
...
@@ -7,7 +7,7 @@
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.2
0 2002/01/03 08:53:00
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.2
1 2002/02/18 05:48:44
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -105,6 +105,11 @@ do
fi
else
dbname
=
"
$1
"
fi
if
[
"$#"
-ne
1
]
;
then
echo
"
$CMDNAME
: invalid option:
$2
"
1>&2
echo
"Try '
$CMDNAME
--help' for more information."
1>&2
exit
1
fi
;;
esac
shift
...
...
src/bin/scripts/dropuser
View file @
fbcc0d69
...
...
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.1
4 2001/09/30 22:17:51
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.1
5 2002/02/18 05:48:45
momjian Exp $
#
# Note - this should NOT be setuid.
#
...
...
@@ -91,6 +91,11 @@ do
;;
*
)
DelUser
=
"
$1
"
if
[
"$#"
-ne
1
]
;
then
echo
"
$CMDNAME
: invalid option:
$2
"
1>&2
echo
"Try '
$CMDNAME
--help' for more information."
1>&2
exit
1
fi
;;
esac
shift
;
...
...
src/bin/scripts/vacuumdb
View file @
fbcc0d69
...
...
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.
19 2001/09/30 22:17:51
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.
20 2002/02/18 05:48:45
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -112,6 +112,11 @@ do
;;
*
)
dbname
=
"
$1
"
if
[
"$#"
-ne
1
]
;
then
echo
"
$CMDNAME
: invalid option:
$2
"
1>&2
echo
"Try '
$CMDNAME
--help' for more information."
1>&2
exit
1
fi
;;
esac
shift
...
...
@@ -151,9 +156,12 @@ if [ "$alldb" ]; then
dbname
=
`
${
PATHNAME
}
psql
$PSQLOPT
-q
-t
-A
-d
template1
-c
'SELECT datname FROM pg_database WHERE datallowconn'
`
elif
[
-z
"
$dbname
"
]
;
then
echo
"
$CMDNAME
: missing required argument: database name"
1>&2
echo
"Try '
$CMDNAME
-?' for help."
1>&2
exit
1
if
[
"
$PGUSER
"
]
;
then
dbname
=
"
$PGUSER
"
else
dbname
=
`
${
PATHNAME
}
pg_id
-u
-n
`
fi
[
"
$?
"
-ne
0
]
&&
exit
1
fi
for
db
in
$dbname
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment