diff options
| author | Bruce Momjian <bruce@momjian.us> | 2004-10-16 03:10:17 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2004-10-16 03:10:17 +0000 |
| commit | 88fd162ef64cab7ed197f0612e0b610d57007200 (patch) | |
| tree | 7ea088e7cef6a6848508fe9629c55819a200b399 /src/bin/pg_dump/pg_backup_db.c | |
| parent | 9ffc8ed58b55cb3925bb95cc184583fcb9772013 (diff) | |
| download | postgresql-88fd162ef64cab7ed197f0612e0b610d57007200.tar.gz | |
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/pg_dump/pg_backup_db.c')
| -rw-r--r-- | src/bin/pg_dump/pg_backup_db.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c index 181414c263..989fdf8287 100644 --- a/src/bin/pg_dump/pg_backup_db.c +++ b/src/bin/pg_dump/pg_backup_db.c @@ -5,7 +5,7 @@ * Implements the basic DB functions used by the archiver. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.59 2004/10/01 17:25:55 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.60 2004/10/16 03:10:15 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -168,7 +168,7 @@ _connectDB(ArchiveHandle *AH, const char *reqdb, const char *requser) if (PQstatus(newConn) == CONNECTION_BAD) { noPwd = (strcmp(PQerrorMessage(newConn), - "fe_sendauth: no password supplied\n") == 0); + PQnoPasswordSupplied) == 0); badPwd = (strncmp(PQerrorMessage(newConn), "Password authentication failed for user", 39) == 0); @@ -249,7 +249,7 @@ ConnectDatabase(Archive *AHX, die_horribly(AH, modulename, "failed to connect to database\n"); if (PQstatus(AH->connection) == CONNECTION_BAD && - strcmp(PQerrorMessage(AH->connection), "fe_sendauth: no password supplied\n") == 0 && + strcmp(PQerrorMessage(AH->connection), PQnoPasswordSupplied) == 0 && !feof(stdin)) { PQfinish(AH->connection); |
