def METHOD_NAME(sql, msg=None, useSelect=True):
    if useSelect:
        cmd = "select"
    else:
        cmd = "execute"
    if flags["p"]:
        sys.stdout.write("\n%s\n\n" % sql)
        return
    try:
        grass.run_command("db.%s" % cmd, sql=sql, **pg_conn)
    except CalledModuleError:
        if msg:
            grass.fatal(msg)
        else:
            grass.fatal(_("Unable to build PostGIS topology"))