*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.64 2002/01/18 16:14:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.65 2002/02/20 22:47:12 tgl Exp $
*/
#include "postgres_fe.h"
#include "command.h"
/* need to prompt for password? */
if (pset.getPassword)
- pwparam = prompted_password = simple_prompt("Password: ", 100, false); /* need to save for
- * free() */
+ pwparam = prompted_password = simple_prompt("Password: ", 100, false);
/*
- * Use old password if no new one given (if you didn't have an old
- * one, fine)
+ * Use old password (if any) if no new one given and we are
+ * reconnecting as same user
*/
if (!pwparam && oldconn && PQuser(oldconn) && userparam &&
strcmp(PQuser(oldconn), userparam) == 0)