aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-31 18:38:44 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-31 18:38:44 +0000
commit52522850fefbcfed25faa5c724b41635b51cac50 (patch)
treebd85f890981dba4053359ed7b038b68f55aa6819 /src
parente41b8a0fddde6f3c133a5ba2a2bedb7b3cacde09 (diff)
downloadpostgresql-52522850fefbcfed25faa5c724b41635b51cac50.tar.gz
postgresql-52522850fefbcfed25faa5c724b41635b51cac50.zip
Don't say 'export PGHOST' or 'export PGPORT' unless we actually define
those variables. Some shells will invent an empty-string definition in this case, which is not what we want.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/pg_regress.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/test/regress/pg_regress.sh b/src/test/regress/pg_regress.sh
index 0b13f699563..5879147d7a8 100644
--- a/src/test/regress/pg_regress.sh
+++ b/src/test/regress/pg_regress.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.14 2000/12/11 19:00:33 tgl Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.15 2000/12/31 18:38:44 tgl Exp $
me=`basename $0`
: ${TMPDIR=/tmp}
@@ -89,9 +89,6 @@ unset top_builddir
unset temp_install
unset multibyte
-export PGHOST
-export PGPORT
-
dbname=regression
hostname=localhost
@@ -138,9 +135,11 @@ do
shift;;
--host=*)
PGHOST=`expr "x$1" : "x--host=\(.*\)"`
+ export PGHOST
shift;;
--port=*)
PGPORT=`expr "x$1" : "x--port=\(.*\)"`
+ export PGPORT
shift;;
--user=*)
PGUSER=`expr "x$1" : "x--user=\(.*\)"`
@@ -276,10 +275,12 @@ then
PGDATA=$temp_install/data
if [ "$unix_sockets" = no ]; then
PGHOST=$hostname
+ export PGHOST
else
unset PGHOST
fi
PGPORT=65432
+ export PGPORT
# ----------
# Set up shared library paths, needed by psql and pg_encoding
@@ -357,7 +358,10 @@ then
else # not temp-install
# If Unix sockets are not available, use the local host by default.
- [ "$unix_sockets" = no ] && ${PGHOST=$hostname}
+ if [ "$unix_sockets" = no ]; then
+ PGHOST=$hostname
+ export PGHOST
+ fi
if [ -n "$PGPORT" ]; then
port_info="port $PGPORT"