Peter Eisentraut wrote:
> Harald Armin Massa wrote:
> > ----------------------------------------------
> > Usage:
> >  pg_restore [OPTION]... [FILE]
> >
> > General options:
> > -d, --dbname=NAME        output database name (to restore into a psql
> > database)
> > -f, --file=FILENAME      output file name (to convert custom/tar to
> > plain SQL)
> > -F, --format=c|t         specify backup file format (custom or tar,
> > plain text is not possible)
> > ----------------------------------------------
> 
> These lines are too long for help output.  Also, there is no such thing 
> as a "psql database".

Agreed.

However, I wonder if "output database" is the proper name for -d?  Isn't
it more "restore database" or "target database"?  Output makes me think
of pg_dump.

pg_restore manual page has for -d:

       --dbname=dbname
              Connect  to  database  dbname  and restore directly
              into the database.

No mention of "output" there.

I have updated some of the help wording for pg_restore which should clarify
things.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/bin/pg_dump/pg_restore.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v
retrieving revision 1.62
diff -c -c -r1.62 pg_restore.c
*** src/bin/pg_dump/pg_restore.c        12 Oct 2004 21:54:44 -0000      1.62
--- src/bin/pg_dump/pg_restore.c        13 Oct 2004 00:40:10 -0000
***************
*** 360,366 ****
        printf(_("  %s [OPTION]... [FILE]\n"), progname);
  
        printf(_("\nGeneral options:\n"));
!       printf(_("  -d, --dbname=NAME        output database name\n"));
        printf(_("  -f, --file=FILENAME      output file name\n"));
        printf(_("  -F, --format=c|t         specify backup file format\n"));
        printf(_("  -i, --ignore-version     proceed even when server version 
mismatches\n"));
--- 360,366 ----
        printf(_("  %s [OPTION]... [FILE]\n"), progname);
  
        printf(_("\nGeneral options:\n"));
!       printf(_("  -d, --dbname=NAME        restore database name\n"));
        printf(_("  -f, --file=FILENAME      output file name\n"));
        printf(_("  -F, --format=c|t         specify backup file format\n"));
        printf(_("  -i, --ignore-version     proceed even when server version 
mismatches\n"));
***************
*** 369,382 ****
        printf(_("  --help                   show this help, then exit\n"));
        printf(_("  --version                output version information, then 
exit\n"));
  
!       printf(_("\nOptions controlling the output content:\n"));
        printf(_("  -a, --data-only          restore only the data, no schema\n"));
        printf(_("  -c, --clean              clean (drop) schema prior to create\n"));
        printf(_("  -C, --create             issue commands to create the 
database\n"));
        printf(_("  -I, --index=NAME         restore named index\n"));
        printf(_("  -L, --use-list=FILENAME  use specified table of contents for 
ordering\n"
                         "                           output from this file\n"));
!       printf(_("  -O, --no-owner           do not output commands to set object 
ownership\n"));
        printf(_("  -P, --function=NAME(args)\n"
                         "                           restore named function\n"));
        printf(_("  -s, --schema-only        restore only the schema, no data\n"));
--- 369,382 ----
        printf(_("  --help                   show this help, then exit\n"));
        printf(_("  --version                output version information, then 
exit\n"));
  
!       printf(_("\nOptions controlling the restore:\n"));
        printf(_("  -a, --data-only          restore only the data, no schema\n"));
        printf(_("  -c, --clean              clean (drop) schema prior to create\n"));
        printf(_("  -C, --create             issue commands to create the 
database\n"));
        printf(_("  -I, --index=NAME         restore named index\n"));
        printf(_("  -L, --use-list=FILENAME  use specified table of contents for 
ordering\n"
                         "                           output from this file\n"));
!       printf(_("  -O, --no-owner           do not issue commands to set object 
ownership\n"));
        printf(_("  -P, --function=NAME(args)\n"
                         "                           restore named function\n"));
        printf(_("  -s, --schema-only        restore only the schema, no data\n"));
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to