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