Magnus Hagander wrote: > > I basically report the connection error string if it starts with "FATAL:". > > > > I originally tried to check for an ERRCODE_INVALID_PASSWORD error field > > (see // comments), but it seems there is no way to access this, i.e. > > PQgetResult(conn) on a connection failure is always NULL. > > > > Anyway, perhaps FATAL is a better test because it will report any major > > failure, not just a .pgpass one. > > > > Patch attached. > > Bad Bruce, using C++ comments like that :P And non-context diff ;)
That comment use was to highlight that those are not for commit, but there if people want to test. As far as the diff, it seems git-external-diff isn't portable to non-Linux systems; I will post a separate email on that. > Does this actually solve the *problem*, though? The problem is not > what is reported on stdout/stderr, the problem is that the net result > is that the server is reported as not started (by the service control > manager) when it actually *is* started. In this case, stderr doesn't > even go anywhere. What happens if you *don't* Ctrl-C it? I was just going to post on that. :-) Right now, it prints the FATAL and keeps printing 60 times, then says not running. Should we just exit on FATAL and output a special exit string, or say running? -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers