This patch fixes a bug in the error message emitted by pg_restore on an incorrect -F argument: write_msg() expects its first parameter to be a "module name", not the format string. Patch applied to HEAD. Is this worth backporting?

BTW, is there a reason that pg_restore seems to accept 'f', 't', or 'c' parameters to this argument, but the documentation only documents 't' and 'c'?

-Neil
Index: src/bin/pg_dump/pg_restore.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/bin/pg_dump/pg_restore.c,v
retrieving revision 1.69
diff -c -r1.69 pg_restore.c
*** src/bin/pg_dump/pg_restore.c	22 Feb 2005 04:39:38 -0000	1.69
--- src/bin/pg_dump/pg_restore.c	29 Apr 2005 06:46:34 -0000
***************
*** 313,319 ****
  				break;
  
  			default:
! 				write_msg("unrecognized archive format '%s'; please specify 't' or 'c'\n",
  						  opts->formatName);
  				exit(1);
  		}
--- 313,319 ----
  				break;
  
  			default:
! 				write_msg(NULL, "unrecognized archive format '%s'; please specify 't' or 'c'\n",
  						  opts->formatName);
  				exit(1);
  		}
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to