aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 7dd0cb232ec..a060e00abc7 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.166 2006/04/02 20:08:22 neilc Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.167 2006/05/31 11:02:42 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -681,8 +681,9 @@ exec_command(const char *cmd,
PGresult *res;
initPQExpBuffer(&buf);
- printfPQExpBuffer(&buf, "ALTER USER %s PASSWORD '%s';",
- fmtId(user), encrypted_password);
+ printfPQExpBuffer(&buf, "ALTER USER %s PASSWORD %c'%s';",
+ fmtId(user), NEED_E_STR(encrypted_password),
+ encrypted_password);
res = PSQLexec(buf.data, false);
termPQExpBuffer(&buf);
if (!res)