diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-05-31 11:02:42 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-05-31 11:02:42 +0000 |
commit | eaca1175e98e937d6b2a9204a53a464fa00d1d56 (patch) | |
tree | c8531e0dd2797228f07889d83b5dd719cd02de94 /src/bin/scripts/createuser.c | |
parent | 751d985805f3bd21c745c2dc9823098afc932e10 (diff) | |
download | postgresql-eaca1175e98e937d6b2a9204a53a464fa00d1d56.tar.gz postgresql-eaca1175e98e937d6b2a9204a53a464fa00d1d56.zip |
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
Diffstat (limited to 'src/bin/scripts/createuser.c')
-rw-r--r-- | src/bin/scripts/createuser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c index bf618eea186..17b3407a3a3 100644 --- a/src/bin/scripts/createuser.c +++ b/src/bin/scripts/createuser.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/createuser.c,v 1.30 2006/05/29 19:52:46 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.31 2006/05/31 11:02:42 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -243,6 +243,8 @@ main(int argc, char *argv[]) printfPQExpBuffer(&sql, "CREATE ROLE %s", fmtId(newuser)); if (newpassword) { + executeCommand(conn, "SET escape_string_warning TO 'off'", progname, false); + if (encrypted == TRI_YES) appendPQExpBuffer(&sql, " ENCRYPTED"); if (encrypted == TRI_NO) |