Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/scripts/createuser')
-rw-r--r--src/bin/scripts/createuser46
1 files changed, 1 insertions, 45 deletions
diff --git a/src/bin/scripts/createuser b/src/bin/scripts/createuser
index da8b5a801b6..cba8cd20280 100644
--- a/src/bin/scripts/createuser
+++ b/src/bin/scripts/createuser
@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.10 2000/06/09 15:50:53 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.11 2000/06/12 03:40:49 momjian Exp $
#
# Note - this should NOT be setuid.
#
@@ -21,8 +21,6 @@ NewUser=
SysID=
CanAddUser=
CanCreateDb=
-CanCreateTab=
-CanLockTab=
PwPrompt=
Password=
PSQLOPT=
@@ -92,18 +90,6 @@ do
--no-createdb|-D)
CanCreateDb=f
;;
- --createtable|-t)
- CanCreateTab=t
- ;;
- --no-createtable|-T)
- CanCreateTab=f
- ;;
- --locktable|-l)
- CanLockTab=t
- ;;
- --no-locktable|-L)
- CanLockTab=f
- ;;
--adduser|-a)
CanAddUser=t
;;
@@ -143,10 +129,6 @@ if [ "$usage" ]; then
echo "Options:"
echo " -d, --createdb User can create new databases"
echo " -D, --no-createdb User cannot create databases"
- echo " -t, --createtable User can create new tables"
- echo " -T, --no-createtable User cannot create tables"
- echo " -l, --locktable User can lock tables"
- echo " -L, --no-locktable User cannot lock tables"
echo " -a, --adduser User can add new users"
echo " -A, --no-adduser User cannot add new users"
echo " -i, --sysid=SYSID Select sysid for new user"
@@ -222,27 +204,6 @@ if [ -z "$CanAddUser" ]; then
fi
fi
-if [ -z "$CanCreateTab" ]; then
- $ECHO_N "Shall the new user be allowed to create tables? (y/n) "$ECHO_C
- read REPLY
- [ $? -ne 0 ] && exit 1
- if [ $REPLY = "y" -o $REPLY = "Y" ]; then
- CanCreateTab=t
- else
- CanCreateTab=f
- fi
-fi
-
-if [ -z "$CanLockTab" ]; then
- $ECHO_N "Shall the new user be allowed to lock tables? (y/n) "$ECHO_C
- read REPLY
- [ $? -ne 0 ] && exit 1
- if [ $REPLY = "y" -o $REPLY = "Y" ]; then
- CanLockTab=t
- else
- CanLockTab=f
- fi
-fi
#
# build SQL command
@@ -261,11 +222,6 @@ SUBQUERY=
[ "$CanCreateDb" = f ] && QUERY="$QUERY NOCREATEDB"
[ "$CanAddUser" = t ] && QUERY="$QUERY CREATEUSER"
[ "$CanAddUser" = f ] && QUERY="$QUERY NOCREATEUSER"
-[ "$CanCreateTab" = t ] && QUERY="$QUERY CREATETABLE"
-[ "$CanCreateTab" = f ] && QUERY="$QUERY NOCREATETABLE"
-[ "$CanLockTab" = t ] && QUERY="$QUERY LOCKTABLE"
-[ "$CanLockTab" = f ] && QUERY="$QUERY NOLOCKTABLE"
-
${PATHNAME}psql -c "$QUERY" -d template1 $PSQLOPT
if [ $? -ne 0 ]; then