summaryrefslogtreecommitdiff
path: root/src/bin/scripts/createdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/scripts/createdb')
-rw-r--r--src/bin/scripts/createdb6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/scripts/createdb b/src/bin/scripts/createdb
index 3087688a3ad..639de5476c1 100644
--- a/src/bin/scripts/createdb
+++ b/src/bin/scripts/createdb
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.23 2002/06/20 20:29:42 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.24 2002/08/10 16:57:32 petere Exp $
#
#-------------------------------------------------------------------------
@@ -166,7 +166,9 @@ then
fi
if [ -z "$dbname" ]; then
- if [ "$PGUSER" ]; then
+ if [ "$PGDATABASE" ]; then
+ dbname="$PGDATABASE"
+ elif [ "$PGUSER" ]; then
dbname="$PGUSER"
else
dbname=`${PATHNAME}pg_id -u -n`