(curs, schema)
return res[0]
Does schema exists?
Does schema exists?
Does schema exists?
def exists_schema(curs, schema):
    """Does schema exists?"""
    q = "select count(1) from pg_namespace where nspname = %s"
    curs.execute(q, [schema])
    res = curs.fetchone()
    return res[0]
def exists_schema ( curs , schema ) : q = "select count(1) from pg_namespace where nspname = %s" curs . execute ( q , [ schema ] ) res = curs . fetchone ( ) return res [ 0 ]