db='tracker' # LOAD TRACKER DATABASE echo " " > load.sql for table in \ invoicelineitem expense work cashwithdrawals cashdeposits buglog bug \ persbudgproj budgetproject accountsrecv project budget companyperson \ company userauth person users domain { echo deleting $table... echo "delete from $table;" >> load.sql } curd=`pwd` for table in \ domain users person userauth company companyperson budget project accountsrecv \ budgetproject persbudgproj bug buglog cashdeposits cashwithdrawals work expense \ invoicelineitem { echo loading $table... echo "copy $table from '$curd/$table.out' delimiters '|' with null as '';" >> load.sql } psql -e -f load.sql tracker