diff options
author | Bruce Momjian | 2004-10-16 03:10:17 +0000 |
---|---|---|
committer | Bruce Momjian | 2004-10-16 03:10:17 +0000 |
commit | 88fd162ef64cab7ed197f0612e0b610d57007200 (patch) | |
tree | 7ea088e7cef6a6848508fe9629c55819a200b399 /src/bin/scripts/common.c | |
parent | 9ffc8ed58b55cb3925bb95cc184583fcb9772013 (diff) |
Allow pg_ctl to determine the server is up when getting a request for a
password.
Make password error message a #define and use it consistently.
Sean Chittenden
Diffstat (limited to 'src/bin/scripts/common.c')
-rw-r--r-- | src/bin/scripts/common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c index 7fe8b406018..a52b30fec88 100644 --- a/src/bin/scripts/common.c +++ b/src/bin/scripts/common.c @@ -5,13 +5,14 @@ * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.11 2004/08/29 05:06:54 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.12 2004/10/16 03:10:16 momjian Exp $ * *------------------------------------------------------------------------- */ #include "postgres_fe.h" #include "common.h" +#include "libpq-fe.h" #include <pwd.h> #include <unistd.h> @@ -102,7 +103,7 @@ connectDatabase(const char *dbname, const char *pghost, const char *pgport, } if (PQstatus(conn) == CONNECTION_BAD && - strcmp(PQerrorMessage(conn), "fe_sendauth: no password supplied\n") == 0 && + strcmp(PQerrorMessage(conn), PQnoPasswordSupplied) == 0 && !feof(stdin)) { PQfinish(conn); |