def METHOD_NAME():
    """Main program"""
    opts, _args = parse_args()
    export_pgvars()
    writeln("-- navpgdump invoked on %s at %s" % (socket.gethostname(), datetime.now()))
    if opts.exclude or opts.filters:
        writeln("-- args: %r" % sys.argv)
        pg_dump(STD_DUMP_ARGS + ["--schema-only"])
        excluded = set(opts.exclude).union(opts.filters.keys())
        pg_dump(
            STD_DUMP_ARGS
            + ["--data-only"]
            + ["--exclude-table=%s" % tbl for tbl in excluded]
        )
        if opts.filters:
            for table, where in opts.filters.items():
                filtered_dump(table, where)
    else:
        pg_dump(STD_DUMP_ARGS)
    msg(
        """