*** pgsql/src/bin/scripts/common.c 2009/02/25 13:24:40 1.34 --- pgsql/src/bin/scripts/common.c 2009/02/26 16:02:38 1.35 *************** *** 7,13 **** * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.33 2009/01/01 17:23:55 momjian Exp $ * *------------------------------------------------------------------------- */ --- 7,13 ---- * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.34 2009/02/25 13:24:40 petere Exp $ * *------------------------------------------------------------------------- */ *************** handle_help_version_opts(int argc, char *** 96,109 **** */ PGconn * connectDatabase(const char *dbname, const char *pghost, const char *pgport, ! const char *pguser, bool require_password, const char *progname) { PGconn *conn; char *password = NULL; bool new_pass; ! if (require_password) password = simple_prompt("Password: ", 100, false); /* --- 96,109 ---- */ PGconn * connectDatabase(const char *dbname, const char *pghost, const char *pgport, ! const char *pguser, enum trivalue prompt_password, const char *progname) { PGconn *conn; char *password = NULL; bool new_pass; ! if (prompt_password == TRI_YES) password = simple_prompt("Password: ", 100, false); /* *************** connectDatabase(const char *dbname, cons *** 124,130 **** if (PQstatus(conn) == CONNECTION_BAD && PQconnectionNeedsPassword(conn) && ! password == NULL) { PQfinish(conn); password = simple_prompt("Password: ", 100, false); --- 124,131 ---- if (PQstatus(conn) == CONNECTION_BAD && PQconnectionNeedsPassword(conn) && ! password == NULL && ! prompt_password != TRI_NO) { PQfinish(conn); password = simple_prompt("Password: ", 100, false);