mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Fix bogus prompt for password in -u case. Per gripe from Robert Treat.
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.142 2007/12/09 19:01:40 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.143 2007/12/09 19:04:47 tgl Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
@ -194,8 +194,8 @@ main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
password_prompt = malloc(strlen(_("Password for user %s: ")) - 2 +
|
password_prompt = malloc(strlen(_("Password for user %s: ")) - 2 +
|
||||||
strlen(options.username) + 1);
|
strlen(username) + 1);
|
||||||
sprintf(password_prompt, _("Password for user %s: "), options.username);
|
sprintf(password_prompt, _("Password for user %s: "), username);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pset.getPassword)
|
if (pset.getPassword)
|
||||||
|
Reference in New Issue
Block a user