def _role_remove(name, user=None, host=None, port=None, maintenance_db=None, password=None, runas=None):
 if (not user_exists(name, user, host, port, maintenance_db, password=password, runas=runas)):
  log.info("User '{0}' does not exist".format(name))
  return False
 sub_cmd = 'DROP ROLE "{0}"'.format(name)
 _psql_prepare_and_run(['-c', sub_cmd], runas=runas, host=host, user=user, port=port, maintenance_db=maintenance_db, password=password)
 if (not user_exists(name, user, host, port, maintenance_db, password=password, runas=runas)):
  return True
 else:
  log.info("Failed to delete user '{0}'.".format(name))
  return False

def _role_remove ( name , user = None , host = None , port = None , maintenance_db = None , password = None , runas = None ) : if ( not user_exists ( name , user , host , port , maintenance_db , password = password , runas = runas ) ) : log . info ( "User '{0}' does not exist" . format ( name ) ) return False sub_cmd = 'DROP ROLE "{0}"' . format ( name ) _psql_prepare_and_run ( [ '-c' , sub_cmd ] , runas = runas , host = host , user = user , port = port , maintenance_db = maintenance_db , password = password ) if ( not user_exists ( name , user , host , port , maintenance_db , password = password , runas = runas ) ) : return True else : log . info ( "Failed to delete user '{0}'." . format ( name ) ) return False
removes a role from the postgres server .