]> granicus.if.org Git - postgis/commitdiff
fix for ERROR in regression logs
authorKevin Neufeld <kneufeld.ca@gmail.com>
Wed, 29 Apr 2009 19:36:00 +0000 (19:36 +0000)
committerKevin Neufeld <kneufeld.ca@gmail.com>
Wed, 29 Apr 2009 19:36:00 +0000 (19:36 +0000)
- first test if the table is there before attempting to drop it

git-svn-id: http://svn.osgeo.org/postgis/branches/1.3@4041 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test

index 5a170909f07128bb822497ee583979bc5bcc218a..52f8703d887609de89b717fd08d24788cd9a529b 100755 (executable)
@@ -179,7 +179,9 @@ run_loader_test ()
 
        show_progress
 
-       ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1
+       if [ `${PSQL} -t -A -c "SELECT count(*) FROM pg_tables WHERE tablename = '${_tblname}'" "${DB}"` -gt 0 ]; then
+               ${PSQL} -c "DROP TABLE ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1
+       fi
        ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1
        if [ $? -gt 0 ]; then
                fail "sourcing shp2pgsql output" "${TMPDIR}/loader.err"