What is this trying to tell us?
if (ret == -1)
fprintf(stderr,
_("The program \"postgres\" is needed by %s "
"but was not found in the same directory as \"%s\".\n"
"Check your installation.\n"),
progname, progname);
else
fprintf(stderr,
_("The program \"postgres\" was found by %s "
"but was not the same version as \"%s\".\n"
"Check your installation.\n"),
progname, progname);
Shouldn't the second progname be argv[0] or something else that contains
the full path?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/