def METHOD_NAME(table, where):
    """Dumps table data using specific WHERE clause for filtering"""
    kwargs = dict(table=table, where=where)
    search_path = ",".join(pgsync.Synchronizer.required_namespaces)
    writeln("SET search_path TO %s;" % search_path)
    writeln("ALTER TABLE {table} DISABLE TRIGGER ALL;".format(**kwargs))
    writeln("COPY {table} FROM stdin;".format(**kwargs))
    psql(
        ["-c", "COPY (SELECT * FROM {table} WHERE {where}) TO STDOUT".format(**kwargs)]
    )
    writeln("\\.\n")
    writeln("ALTER TABLE {table} ENABLE TRIGGER ALL;".format(**kwargs))