aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_restore.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-01-23 23:10:15 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-01-23 23:10:15 +0200
commit7f508f1c6b515df66d27f860b2faa7b5761fa55d (patch)
tree4c7390c61e8a890c22d97f83364b89f729f21ca8 /src/bin/pg_dump/pg_restore.c
parentf36920796ec1335733493f7860d6f2f711c20398 (diff)
downloadpostgresql-7f508f1c6b515df66d27f860b2faa7b5761fa55d.tar.gz
postgresql-7f508f1c6b515df66d27f860b2faa7b5761fa55d.zip
Add 'directory' format to pg_dump. The new directory format is compatible
with the 'tar' format, in that untarring a tar format archive produces a valid directory format archive. Joachim Wieland and Heikki Linnakangas
Diffstat (limited to 'src/bin/pg_dump/pg_restore.c')
-rw-r--r--src/bin/pg_dump/pg_restore.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 1ddba727515..37793ad18fc 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -352,6 +352,11 @@ main(int argc, char **argv)
opts->format = archCustom;
break;
+ case 'd':
+ case 'D':
+ opts->format = archDirectory;
+ break;
+
case 'f':
case 'F':
opts->format = archFiles;
@@ -363,7 +368,7 @@ main(int argc, char **argv)
break;
default:
- write_msg(NULL, "unrecognized archive format \"%s\"; please specify \"c\" or \"t\"\n",
+ write_msg(NULL, "unrecognized archive format \"%s\"; please specify \"c\", \"d\" or \"t\"\n",
opts->formatName);
exit(1);
}
@@ -418,7 +423,7 @@ usage(const char *progname)
printf(_("\nGeneral options:\n"));
printf(_(" -d, --dbname=NAME connect to database name\n"));
printf(_(" -f, --file=FILENAME output file name\n"));
- printf(_(" -F, --format=c|t backup file format (should be automatic)\n"));
+ printf(_(" -F, --format=c|d|t backup file format (should be automatic)\n"));
printf(_(" -l, --list print summarized TOC of the archive\n"));
printf(_(" -v, --verbose verbose mode\n"));
printf(_(" --help show this help, then exit\n"));