Allow SQLStatements specific for postgres

This commit is contained in:
Carlos Ruiz 2007-05-15 19:11:32 +00:00
parent 1b17a6ad49
commit 4ef7cd2bc0
1 changed files with 16 additions and 2 deletions

View File

@ -2526,6 +2526,20 @@ public class PackInHandler extends DefaultHandler {
pstmt.executeUpdate();
log.info("Executed SQL Statement for Oracle: "+ atts.getValue("statement"));
}
else if(DB.isPostgreSQL() == true && DBType.equals("PostgreSQL")){
// Avoid convert layer - command specific for postgresql
//
// pstmt = DB.prepareStatement(sql, null);
// pstmt.executeUpdate();
//
Connection m_con = DB.getConnectionRW(true);
Statement stmt = m_con.createStatement();
int n = stmt.executeUpdate (atts.getValue("statement"));
log.info("Executed SQL Statement for PostgreSQL: "+ atts.getValue("statement"));
// Postgres needs to commit DDL statements
if (m_con != null && !m_con.getAutoCommit())
m_con.commit();
}
/* else if(DB.isSybase() == true && DBType.equals("Sybase")){
pstmt.executeUpdate();
log.info("Exceuted SQL Statement for Sybase");