Skip to content

Commit e8191d9

Browse files
committed
Fix bogus prompt for password in -u case. Per gripe from Robert Treat.
1 parent 4f9bf7f commit e8191d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/psql/startup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.142 2007/12/09 19:01:40 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.143 2007/12/09 19:04:47 tgl Exp $
77
*/
88
#include "postgres_fe.h"
99

@@ -194,8 +194,8 @@ main(int argc, char *argv[])
194194
else
195195
{
196196
password_prompt = malloc(strlen(_("Password for user %s: ")) - 2 +
197-
strlen(options.username) + 1);
198-
sprintf(password_prompt, _("Password for user %s: "), options.username);
197+
strlen(username) + 1);
198+
sprintf(password_prompt, _("Password for user %s: "), username);
199199
}
200200

201201
if (pset.getPassword)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy