def lang_istrusted(cursor, lang):
 query = ("SELECT lanpltrusted FROM pg_language WHERE lanname='%s'" % lang)
 cursor.execute(query)
 return cursor.fetchone()[0]

def lang_istrusted ( cursor , lang ) : query = ( "SELECT lanpltrusted FROM pg_language WHERE lanname='%s'" % lang ) cursor . execute ( query ) return cursor . fetchone ( ) [ 0 ]
checks if language is trusted for db .