#!/bin/sh
# $HEADER:
# 
# wisconsin.sh - populates and runs the wisconsin benchmark on a database
# named "bench".
#

if (test ! -z "$POSTGRESHOME")
then
    PGHOME=$POSTGRESHOME
else
    PGHOME=/usr/postgres
fi

POSTGRES=$PGHOME/bin/postgres
POSTMASTER=$PGHOME/bin/postmaster
CREATEDB=$PGHOME/bin/createdb.sh
VCONTROL=$PGHOME/bin/vcontrol
MAKE=/bin/make

echo ===== populating initial relations ======

for i in querycreat querycopy querydefineindex queryBprime
do
    $POSTGRES -Q mao < $i > /dev/null
done

echo done 
