Commit e837e4be authored by Tom Lane's avatar Tom Lane

Use psql -q option instead of 2>/dev/null during first invocation

of psql; this should make it easier to diagnose client-side problems,
such as library version mismatch.  Also, consistently use -X option
to avoid problems from weird .psqlrc settings.
parent 44e8a968
#! /bin/sh #! /bin/sh
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.48 2004/10/24 22:09:33 tgl Exp $ # $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.49 2004/10/31 19:14:16 tgl Exp $
me=`basename $0` me=`basename $0`
: ${TMPDIR=/tmp} : ${TMPDIR=/tmp}
...@@ -414,7 +414,7 @@ then ...@@ -414,7 +414,7 @@ then
# wait forever, however. # wait forever, however.
i=0 i=0
max=60 max=60
until "$bindir/psql" $psql_options template1 </dev/null 2>/dev/null until "$bindir/psql" -X $psql_options template1 </dev/null 2>/dev/null
do do
i=`expr $i + 1` i=`expr $i + 1`
if [ $i -ge $max ] if [ $i -ge $max ]
...@@ -470,14 +470,14 @@ else # not temp-install ...@@ -470,14 +470,14 @@ else # not temp-install
if [ -n "$PGHOST" ]; then if [ -n "$PGHOST" ]; then
echo "(using postmaster on $PGHOST, $port_info)" echo "(using postmaster on $PGHOST, $port_info)"
else else
case $host_platform in case $host_platform in
*-*-mingw32*) *-*-mingw32*)
echo "(using postmaster on localhost socket, $port_info)" echo "(using postmaster on localhost socket, $port_info)"
;; ;;
*) *)
echo "(using postmaster on Unix socket, $port_info)" echo "(using postmaster on Unix socket, $port_info)"
;; ;;
esac esac
fi fi
message "dropping database \"$dbname\"" message "dropping database \"$dbname\""
"$bindir/dropdb" $psql_options "$dbname" "$bindir/dropdb" $psql_options "$dbname"
...@@ -529,12 +529,12 @@ if [ $? -ne 0 ]; then ...@@ -529,12 +529,12 @@ if [ $? -ne 0 ]; then
(exit 2); exit (exit 2); exit
fi fi
"$bindir/psql" $psql_options -c "\ "$bindir/psql" -q -X $psql_options -c "\
checkpoint; checkpoint;
alter database \"$dbname\" set lc_messages to 'C'; alter database \"$dbname\" set lc_messages to 'C';
alter database \"$dbname\" set lc_monetary to 'C'; alter database \"$dbname\" set lc_monetary to 'C';
alter database \"$dbname\" set lc_numeric to 'C'; alter database \"$dbname\" set lc_numeric to 'C';
alter database \"$dbname\" set lc_time to 'C';" "$dbname" 2>/dev/null alter database \"$dbname\" set lc_time to 'C';" "$dbname"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "$me: could not set database default locales" echo "$me: could not set database default locales"
(exit 2); exit (exit 2); exit
...@@ -546,7 +546,7 @@ fi ...@@ -546,7 +546,7 @@ fi
# ---------- # ----------
message "dropping regression test user accounts" message "dropping regression test user accounts"
"$bindir/psql" $psql_options -c 'DROP GROUP regressgroup1; DROP GROUP regressgroup2; DROP USER regressuser1, regressuser2, regressuser3, regressuser4;' $dbname 2>/dev/null "$bindir/psql" -q -X $psql_options -c 'DROP GROUP regressgroup1; DROP GROUP regressgroup2; DROP USER regressuser1, regressuser2, regressuser3, regressuser4;' $dbname 2>/dev/null
if [ $? -eq 2 ]; then if [ $? -eq 2 ]; then
echo "$me: could not drop user accounts" echo "$me: could not drop user accounts"
(exit 2); exit (exit 2); exit
......
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