summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-06-01 00:15:36 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-06-01 00:15:36 +0000
commit6178762fcf02f5f07099ff2277f8cdd82151cd0e (patch)
tree5062f78532e80a62014ccf43ac9d53164913136e /src/bin/psql/command.c
parent2703007501e883f6f9968c274cf118f6cf362ebd (diff)
downloadpostgresql-6178762fcf02f5f07099ff2277f8cdd82151cd0e.tar.gz
Fix up hack to suppress escape_string_warning so that it actually works
and there's only one place that's a kluge, ie, appendStringLiteralConn. Note that pg_dump itself doesn't use appendStringLiteralConn, so its behavior is not affected; only the other utility programs care.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index a060e00abc..63161edd45 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.167 2006/05/31 11:02:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.168 2006/06/01 00:15:36 tgl Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -681,9 +681,9 @@ exec_command(const char *cmd,
PGresult *res;
initPQExpBuffer(&buf);
- printfPQExpBuffer(&buf, "ALTER USER %s PASSWORD %c'%s';",
- fmtId(user), NEED_E_STR(encrypted_password),
- encrypted_password);
+ printfPQExpBuffer(&buf, "ALTER USER %s PASSWORD ",
+ fmtId(user));
+ appendStringLiteralConn(&buf, encrypted_password, pset.db);
res = PSQLexec(buf.data, false);
termPQExpBuffer(&buf);
if (!res)