I attach fix for --help output. I replaced --NAME... with -NAME and add some example. getopt parse -- as a end of options and rest of line is not parsed. This should be backported for 8.3 and 8.2 as well. PG8.1 does not have this options.

                Thanks Zdenek
Index: src/backend/main/main.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/main/main.c,v
retrieving revision 1.110
diff -c -r1.110 main.c
*** src/backend/main/main.c	1 Jan 2008 19:45:49 -0000	1.110
--- src/backend/main/main.c	21 Feb 2008 17:02:16 -0000
***************
*** 288,294 ****
  	printf(_("  -p PORT         port number to listen on\n"));
  	printf(_("  -s              show statistics after each query\n"));
  	printf(_("  -S WORK-MEM     set amount of memory for sorts (in kB)\n"));
! 	printf(_("  --NAME=VALUE    set run-time parameter\n"));
  	printf(_("  --describe-config  describe configuration parameters, then exit\n"));
  	printf(_("  --help          show this help, then exit\n"));
  	printf(_("  --version       output version information, then exit\n"));
--- 288,294 ----
  	printf(_("  -p PORT         port number to listen on\n"));
  	printf(_("  -s              show statistics after each query\n"));
  	printf(_("  -S WORK-MEM     set amount of memory for sorts (in kB)\n"));
! 	printf(_("  -NAME=VALUE     set run-time parameter (e.g. -shared_buffers=16384)\n"));
  	printf(_("  --describe-config  describe configuration parameters, then exit\n"));
  	printf(_("  --help          show this help, then exit\n"));
  	printf(_("  --version       output version information, then exit\n"));
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

Reply via email to