aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_ctl/pg_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_ctl/pg_ctl.c')
-rw-r--r--src/bin/pg_ctl/pg_ctl.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index d4b69a8bc37..7f9ac2f468d 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -4,7 +4,7 @@
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.36 2004/10/15 01:36:12 neilc Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.37 2004/10/15 04:32:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -531,17 +531,22 @@ do_start(void)
if ((ret = find_other_exec(argv0, "postmaster", PM_VERSIONSTR,
postmaster_path)) < 0)
{
+ char full_path[MAXPGPATH];
+
+ if (find_my_exec(argv0, full_path) < 0)
+ StrNCpy(full_path, progname, MAXPGPATH);
+
if (ret == -1)
write_stderr(_("The program \"postmaster\" is needed by %s "
- "but was not found in the same directory as "
- "\"%s\".\n"
+ "but was not found in the\n"
+ "same directory as \"%s\".\n"
"Check your installation.\n"),
- progname, progname);
+ progname, full_path);
else
- write_stderr(_("The program \"postmaster\" was found by %s "
- "but was not the same version as \"%s\".\n"
+ write_stderr(_("The program \"postmaster\" was found by \"%s\"\n"
+ "but was not the same version as %s.\n"
"Check your installation.\n"),
- progname, progname);
+ full_path, progname);
exit(1);
}
postgres_path = postmaster_path;