Commit 7a6a7d57 authored by Tom Lane's avatar Tom Lane

pg_regress now needs to know that Windows hasn't got unix sockets,

per Andrew Dunstan.  Also, don't override the user's value of PGHOST
in the 'make installcheck' case.  I think the latter was an ill-considered
workaround for the Windows code back when libpq didn't properly default
to localhost on Unix-socket-less platforms.
parent 893c66de
#! /bin/sh
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.52 2005/01/12 16:19:51 tgl Exp $
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.53 2005/01/15 04:15:51 tgl Exp $
me=`basename $0`
: ${TMPDIR=/tmp}
......@@ -192,11 +192,10 @@ esac
# ----------
# When on QNX or BeOS, don't use Unix sockets.
# On some platforms we can't use Unix sockets.
# ----------
case $host_platform in
*-*-qnx* | *beos*)
*-*-cygwin* | *-*-mingw32* | *-*-qnx* | *beos*)
unix_sockets=no;;
*)
unix_sockets=yes;;
......@@ -470,13 +469,6 @@ else # not temp-install
;;
esac
# If Unix sockets are not available, use the local host by default.
if [ "$unix_sockets" = no ]; then
PGHOST=$hostname
export PGHOST
unset PGHOSTADDR
fi
if [ -n "$PGPORT" ]; then
port_info="port $PGPORT"
else
......@@ -486,15 +478,13 @@ else # not temp-install
if [ -n "$PGHOST" ]; then
echo "(using postmaster on $PGHOST, $port_info)"
else
case $host_platform in
*-*-mingw32*)
echo "(using postmaster on localhost socket, $port_info)"
;;
*)
if [ "$unix_sockets" = no ]; then
echo "(using postmaster on localhost, $port_info)"
else
echo "(using postmaster on Unix socket, $port_info)"
;;
esac
fi
fi
message "dropping database \"$dbname\""
"$bindir/dropdb" $psql_options "$dbname"
# errors can be ignored
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment