change for postgres 8.4

This commit is contained in:
Peter Hormanns 2016-04-08 12:29:09 +02:00
parent 89b2b3b5a9
commit f470ed8722
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ public class JDBCProcessor extends AbstractProcessor {
System.out.println("SQL: " + sqlStatement);
s.execute(sqlStatement);
}
return s.getUpdateCount();
return new Integer(0);
} catch (SQLException aSqlExc) {
Exception exc = aSqlExc.getNextException();
if (exc == null) {

View File

@ -46,7 +46,7 @@ public class PgSqlDatabaseProcessorFactory implements EntityProcessorFactory {
assert db.getInstance().equals("pgsql");
JDBCProcessor aJDBCP = createPostgreSqlAdminProcessor();
String aName = AbstractEntity.escapeString(db.getName());
aJDBCP.addSQL("SELECT pg_terminate_backend(procpid) FROM pg_stat_activity WHERE datname='" + aName + "'");
aJDBCP.addSQL("SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='" + aName + "'");
aJDBCP.addSQL("DROP DATABASE " + aName);
return aJDBCP;
}