-F, –format=FORMAT Specifies the output file format (e.g., plain, custom, directory). -f, –file=FILENAME Specifies the name of the output file. -W, –password Forces pg_dump to prompt for a password before connecting to the PostgreSQL server. -w, –no-password Suppresses the passwor...
Show the commands pg_dumpall generates internally.-f, --file=FILENAME Output file name. The default is standard output.-g, --globals-only Dump only global objects, not databases.-l, --load-role=ROLENAME Role name to use when loading the dump.-o, --no-owner Omit commands to set owne...
这样在pg_dump.c中,只要根据用户指定的文件格式的参数,就可以调用相应的处理函数,代码如下: /* open the output file */ if (pg_strcasecmp(format, "a") == 0 || pg_strcasecmp(format, "append") == 0) { /* This is used by pg_dumpall, and is not documented */ plainText = 1; g_fou...