summaryrefslogtreecommitdiff
path: root/src/bin/scripts
diff options
context:
space:
mode:
authorTom Lane2006-06-01 00:15:36 +0000
committerTom Lane2006-06-01 00:15:36 +0000
commit6178762fcf02f5f07099ff2277f8cdd82151cd0e (patch)
tree5062f78532e80a62014ccf43ac9d53164913136e /src/bin/scripts
parent2703007501e883f6f9968c274cf118f6cf362ebd (diff)
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/scripts')
-rw-r--r--src/bin/scripts/createdb.c4
-rw-r--r--src/bin/scripts/createuser.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c
index c023a12bd9d..4998c798dec 100644
--- a/src/bin/scripts/createdb.c
+++ b/src/bin/scripts/createdb.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/createdb.c,v 1.20 2006/05/31 11:02:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/createdb.c,v 1.21 2006/06/01 00:15:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -185,8 +185,6 @@ main(int argc, char *argv[])
{
conn = connectDatabase(dbname, host, port, username, password, progname);
- executeCommand(conn, "SET escape_string_warning TO 'off'", progname, false);
-
printfPQExpBuffer(&sql, "COMMENT ON DATABASE %s IS ", fmtId(dbname));
appendStringLiteralConn(&sql, comment, conn);
appendPQExpBuffer(&sql, ";\n");
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index 17b3407a3a3..e671298fda2 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.31 2006/05/31 11:02:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.32 2006/06/01 00:15:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -243,8 +243,6 @@ 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)