Fix pg_ctl -D handling for Win32:

C:\msys\1.0\home\y-asaba>pg_ctl -D data restart
	waiting for postmaster to shut down...LOG:  received smart shutdown
	request.
	LOG:  shutting down
	LOG:  database system is shut down
	done
	postmaster stopped

	postmaster starting

	C:\msys\1.0\home\y-asaba>postmaster.exe: invalid argument: "'-D'"
	Try "postmaster.exe --help" for more information.

Yoshiyuki Asaba
This commit is contained in:
Bruce Momjian 2004-10-15 04:54:33 +00:00
parent a49f6ad014
commit 8613eac6c4
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.433 2004/10/14 20:23:45 momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.434 2004/10/15 04:54:31 momjian Exp $
*
* NOTES
*
@ -3301,7 +3301,7 @@ CreateOptsFile(int argc, char *argv[], char *fullprogname)
fprintf(fp, "%s", fullprogname);
for (i = 1; i < argc; i++)
fprintf(fp, " '%s'", argv[i]);
fprintf(fp, " %s%s%s", SYSTEMQUOTE, argv[i], SYSTEMQUOTE);
fputs("\n", fp);
if (fclose(fp))

View File

@ -4,7 +4,7 @@
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.37 2004/10/15 04:32:14 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.38 2004/10/15 04:54:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -501,7 +501,7 @@ do_start(void)
{
char *arg1;
arg1 = strchr(optline, '\'');
arg1 = strchr(optline, *SYSTEMQUOTE);
if (arg1 == NULL || arg1 == optline)
post_opts = "";
else