Fixed problem with postgres 8.0.x
[pspp-builds.git] / tests / command / get-data-psql.sh
index 521a97f84c941c6e7a3615770b77c4f8552d66e9..e47b5af7113275c4d26f0b9d2fa0115caf7570c3 100755 (executable)
@@ -22,7 +22,7 @@ export LANG
 port=6543
 dbase=pspptest
 PG_CONFIG=${PG_CONFIG:=pg_config}
-pgpath=`$PG_CONFIG | awk '/BINDIR/{print $3}'`
+pgpath=`$PG_CONFIG --bindir`
 
 cleanup()
 {
@@ -78,11 +78,12 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="create database"
-createdb  -h $TEMPDIR  -p $port $dbase > /dev/null 2> /dev/null
+$pgpath/createdb  -h $TEMPDIR  -p $port $dbase > /dev/null 2> /dev/null
+if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="populate database"
-psql  -h $TEMPDIR -p $port  $dbase > /dev/null << EOF
+$pgpath/psql  -h $TEMPDIR -p $port  $dbase > /dev/null << EOF
 
 CREATE TABLE empty (a int, b date, c numeric(23, 4));