Allow SQLStatements specific for postgres
This commit is contained in:
parent
1b17a6ad49
commit
4ef7cd2bc0
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue