aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/createuser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/scripts/createuser.c')
-rw-r--r--src/bin/scripts/createuser.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index 3d74797a8f5..35a53bf2064 100644
--- a/src/bin/scripts/createuser.c
+++ b/src/bin/scripts/createuser.c
@@ -274,11 +274,14 @@ main(int argc, char *argv[])
{
char *encrypted_password;
- encrypted_password = PQencryptPassword(newpassword,
- newuser);
+ encrypted_password = PQencryptPasswordConn(conn,
+ newpassword,
+ newuser,
+ NULL);
if (!encrypted_password)
{
- fprintf(stderr, _("Password encryption failed.\n"));
+ fprintf(stderr, _("%s: password encryption failed: %s"),
+ progname, PQerrorMessage(conn));
exit(1);
}
appendStringLiteralConn(&sql, encrypted_password, conn);