private boolean tableExists(Table t) throws SQLException {
  String sql="SELECT * FROM pg_tables WHERE schemaname='" + t.getSchema() + "' and tablename='"+ t.getName()+ "'";
  Statement stmt=dbConn.createStatement();
  ResultSet res=stmt.executeQuery(sql);
  if (res.next())   return true;
 else   return false;
}

private boolean tableExists ( Table t ) throws SQLException { String sql = "SELECT * FROM pg_tables WHERE schemaname='" + t . getSchema ( ) + "' and tablename='" + t . getName ( ) + "'" ; Statement stmt = dbConn . createStatement ( ) ; ResultSet res = stmt . executeQuery ( sql ) ; if ( res . next ( ) ) return true ; else return false ; }
checks whether the given table exists in the currently connected database . check is made against " schema . table " .
