change for postgres 8.4
This commit is contained in:
parent
89b2b3b5a9
commit
f470ed8722
@ -65,7 +65,7 @@ public class JDBCProcessor extends AbstractProcessor {
|
|||||||
System.out.println("SQL: " + sqlStatement);
|
System.out.println("SQL: " + sqlStatement);
|
||||||
s.execute(sqlStatement);
|
s.execute(sqlStatement);
|
||||||
}
|
}
|
||||||
return s.getUpdateCount();
|
return new Integer(0);
|
||||||
} catch (SQLException aSqlExc) {
|
} catch (SQLException aSqlExc) {
|
||||||
Exception exc = aSqlExc.getNextException();
|
Exception exc = aSqlExc.getNextException();
|
||||||
if (exc == null) {
|
if (exc == null) {
|
||||||
|
@ -46,7 +46,7 @@ public class PgSqlDatabaseProcessorFactory implements EntityProcessorFactory {
|
|||||||
assert db.getInstance().equals("pgsql");
|
assert db.getInstance().equals("pgsql");
|
||||||
JDBCProcessor aJDBCP = createPostgreSqlAdminProcessor();
|
JDBCProcessor aJDBCP = createPostgreSqlAdminProcessor();
|
||||||
String aName = AbstractEntity.escapeString(db.getName());
|
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);
|
aJDBCP.addSQL("DROP DATABASE " + aName);
|
||||||
return aJDBCP;
|
return aJDBCP;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user