summaryrefslogtreecommitdiff
path: root/src/bin/scripts/dropuser.c
diff options
context:
space:
mode:
authorPeter Eisentraut2006-09-22 18:50:41 +0000
committerPeter Eisentraut2006-09-22 18:50:41 +0000
commitcbb7acface7115dfb17674a68086bc82a3b8fa11 (patch)
treeb2f6cc9819f95d24e2406903fbfc2d7e66daa8ed /src/bin/scripts/dropuser.c
parentae3f415f1db15788c17e163d0d7df6509f81cd2c (diff)
Rearrange yes/no prompting code so that the prompts always show the
(possibly (un)translated) letters that are actually expected as input. Also reject invalid responses instead of silenty taken them as "no". with help from Bernd Helmle
Diffstat (limited to 'src/bin/scripts/dropuser.c')
-rw-r--r--src/bin/scripts/dropuser.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c
index 5d083caef53..1d22368b19e 100644
--- a/src/bin/scripts/dropuser.c
+++ b/src/bin/scripts/dropuser.c
@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.18 2006/05/29 19:52:46 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.19 2006/09/22 18:50:41 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -105,11 +105,8 @@ main(int argc, char *argv[])
if (interactive)
{
- char *reply;
-
printf(_("Role \"%s\" will be permanently removed.\n"), dropuser);
- reply = simple_prompt("Are you sure? (y/n) ", 1, true);
- if (check_yesno_response(reply) != 1)
+ if (!yesno_prompt("Are you sure?"))
exit(0);
}