Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1079403 - Postgres Plugin - Table Vacuum Fails
Browse files Browse the repository at this point in the history
Changed sql query to include the schema which the table is part of.

Also updated table component #invokeOperation method to use connection pooling support
  • Loading branch information
tsegismont committed Apr 8, 2014
1 parent 835eca6 commit 45ddd7c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,17 @@ public OperationResult invokeOperation(String name, Configuration parameters) th
Exception {

if ("vacuum".equals(name)) {
DatabaseQueryUtility.executeUpdate(this, "vacuum " + getTableNameFromContext(resourceContext));
Connection connection = null;
PreparedStatement statement = null;
try {
connection = getPooledConnectionProvider().getPooledConnection();
statement = connection.prepareStatement("vacuum "
+ getFullyQualifiedTableName(getSchemaNameFromContext(resourceContext),
getTableNameFromContext(resourceContext)));
statement.executeUpdate();
} finally {
safeClose(connection, statement);
}
}
return null;
}
Expand Down

0 comments on commit 45ddd7c

Please sign in to comment.