diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2002-08-10 16:57:32 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2002-08-10 16:57:32 +0000 |
commit | 029aa97f2d90a2ef97b2c0ca917bea7268392eb1 (patch) | |
tree | b5a7c08bf2030f7c0b4b1a6cc64ba6e2a809efdb /src/bin/scripts/createlang.sh | |
parent | 60ac5b805e63ee0055fa9ff44a8486953f6dcbbc (diff) |
Make sure all clients have the same understanding of default user name
and database. In particular, make script wrappers understand the
PGDATABASE environment variable.
Diffstat (limited to 'src/bin/scripts/createlang.sh')
-rw-r--r-- | src/bin/scripts/createlang.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/scripts/createlang.sh b/src/bin/scripts/createlang.sh index daca169a0b2..d7a9e98064f 100644 --- a/src/bin/scripts/createlang.sh +++ b/src/bin/scripts/createlang.sh @@ -7,7 +7,7 @@ # Portions Copyright (c) 1996-2002, 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.36 2002/06/20 20:29:42 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.37 2002/08/10 16:57:32 petere Exp $ # #------------------------------------------------------------------------- @@ -147,7 +147,9 @@ 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` |