Skip to content

Commit e837e4b

Browse files
committed
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.
1 parent 44e8a96 commit e837e4b

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/test/regress/pg_regress.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.48 2004/10/24 22:09:33 tgl Exp $
2+
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.49 2004/10/31 19:14:16 tgl Exp $
33

44
me=`basename $0`
55
: ${TMPDIR=/tmp}
@@ -414,7 +414,7 @@ then
414414
# wait forever, however.
415415
i=0
416416
max=60
417-
until "$bindir/psql" $psql_options template1 </dev/null 2>/dev/null
417+
until "$bindir/psql" -X $psql_options template1 </dev/null 2>/dev/null
418418
do
419419
i=`expr $i + 1`
420420
if [ $i -ge $max ]
@@ -470,14 +470,14 @@ else # not temp-install
470470
if [ -n "$PGHOST" ]; then
471471
echo "(using postmaster on $PGHOST, $port_info)"
472472
else
473-
case $host_platform in
474-
*-*-mingw32*)
475-
echo "(using postmaster on localhost socket, $port_info)"
476-
;;
477-
*)
478-
echo "(using postmaster on Unix socket, $port_info)"
479-
;;
480-
esac
473+
case $host_platform in
474+
*-*-mingw32*)
475+
echo "(using postmaster on localhost socket, $port_info)"
476+
;;
477+
*)
478+
echo "(using postmaster on Unix socket, $port_info)"
479+
;;
480+
esac
481481
fi
482482
message "dropping database \"$dbname\""
483483
"$bindir/dropdb" $psql_options "$dbname"
@@ -529,12 +529,12 @@ if [ $? -ne 0 ]; then
529529
(exit 2); exit
530530
fi
531531

532-
"$bindir/psql" $psql_options -c "\
532+
"$bindir/psql" -q -X $psql_options -c "\
533533
checkpoint;
534534
alter database \"$dbname\" set lc_messages to 'C';
535535
alter database \"$dbname\" set lc_monetary to 'C';
536536
alter database \"$dbname\" set lc_numeric to 'C';
537-
alter database \"$dbname\" set lc_time to 'C';" "$dbname" 2>/dev/null
537+
alter database \"$dbname\" set lc_time to 'C';" "$dbname"
538538
if [ $? -ne 0 ]; then
539539
echo "$me: could not set database default locales"
540540
(exit 2); exit
@@ -546,7 +546,7 @@ fi
546546
# ----------
547547

548548
message "dropping regression test user accounts"
549-
"$bindir/psql" $psql_options -c 'DROP GROUP regressgroup1; DROP GROUP regressgroup2; DROP USER regressuser1, regressuser2, regressuser3, regressuser4;' $dbname 2>/dev/null
549+
"$bindir/psql" -q -X $psql_options -c 'DROP GROUP regressgroup1; DROP GROUP regressgroup2; DROP USER regressuser1, regressuser2, regressuser3, regressuser4;' $dbname 2>/dev/null
550550
if [ $? -eq 2 ]; then
551551
echo "$me: could not drop user accounts"
552552
(exit 2); exit

0 commit comments

Comments
 (0)