mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Escape processing patch:
o turns off escape_string_warning in pg_dumpall.c o optionally use E'' for \password (undocumented option?) o honor standard_conforming-strings for \copy (but not support literal E'' strings) o optionally use E'' for \d commands o turn off escape_string_warning for createdb, createuser, droplang
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user