def lang_drop(cursor, lang, cascade):
 cursor.execute('SAVEPOINT ansible_pgsql_lang_drop')
 try:
  if cascade:
   cursor.execute(('DROP LANGUAGE "%s" CASCADE' % lang))
  else:
   cursor.execute(('DROP LANGUAGE "%s"' % lang))
 except:
  cursor.execute('ROLLBACK TO SAVEPOINT ansible_pgsql_lang_drop')
  cursor.execute('RELEASE SAVEPOINT ansible_pgsql_lang_drop')
  return False
 cursor.execute('RELEASE SAVEPOINT ansible_pgsql_lang_drop')
 return True

def lang_drop ( cursor , lang , cascade ) : cursor . execute ( 'SAVEPOINT ansible_pgsql_lang_drop' ) try : if cascade : cursor . execute ( ( 'DROP LANGUAGE "%s" CASCADE' % lang ) ) else : cursor . execute ( ( 'DROP LANGUAGE "%s"' % lang ) ) except : cursor . execute ( 'ROLLBACK TO SAVEPOINT ansible_pgsql_lang_drop' ) cursor . execute ( 'RELEASE SAVEPOINT ansible_pgsql_lang_drop' ) return False cursor . execute ( 'RELEASE SAVEPOINT ansible_pgsql_lang_drop' ) return True
drops language for db .